swig / www

Web pages at http://www.swig.org
10 stars 17 forks source link

wrong python example? #2

Closed aschnell closed 9 years ago

aschnell commented 9 years ago

AFAIS the example at https://github.com/swig/www/blob/master/Doc3.0/Python.html#L2865 should read super(mymodule.Foo, self).__init__(foo).

ojwb commented 9 years ago

That documentation is generated - the master version is in a different repo:

https://github.com/swig/swig/blob/master/Doc/Manual/Python.html#L2865

I'm not really a Python coder and so can't usefully comment on the appropriateness of the change, but if it does need fixing, then submitting a pull request against the main SWIG repo would likely get it done sooner.

wsfulton commented 9 years ago

Indeed the documentation was wrong. Your change doesn't work though and I also couldn't get super to work for Python 2. I've fixed the docs in https://github.com/swig/swig/commit/76d813f321778f0fe213c864e1ff2eecff4df198. I could get the new Python 3 super syntax to work and so I've added this into the docs.