summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2015-02-02 19:49:30 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2015-02-02 19:52:07 +0000
commit76d813f321778f0fe213c864e1ff2eecff4df198 (patch)
treea6d06edfaf76c689de0b3aa273059cd0e7e52d8e /Doc
parent7c3eca368bed05abd78c703725aaa6eb343991b5 (diff)
downloadswig-76d813f321778f0fe213c864e1ff2eecff4df198.tar.gz
Python director documentation correction
Fixes #https://github.com/swig/www/issues/2 [skip ci]
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Manual/Python.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html
index eb102aa3e..3d943ef42 100644
--- a/Doc/Manual/Python.html
+++ b/Doc/Manual/Python.html
@@ -2841,6 +2841,7 @@ the methods one() and two() (but not three()):
class Foo {
public:
Foo(int foo);
+ virtual ~Foo();
virtual void one();
virtual void two();
};
@@ -2861,11 +2862,12 @@ then at the python side you can define
import mymodule
class MyFoo(mymodule.Foo):
- def __init__(self, foo):
- mymodule.Foo(self, foo)
+ def __init__(self, foo):
+ mymodule.Foo.__init__(self, foo)
+# super().__init__(foo) # Alternative construction for Python3
- def one(self):
- print "one from python"
+ def one(self):
+ print "one from python"
</pre>
</div>