From: Yang W. <yw...@pr...> - 2002-02-04 22:07:27
|
Hi All, I intended to have a method in a class that have an overload method. I have the following code in Test.py: class Test: def __init__(self): self.autoCommit =3D 1; def Commit(self, commit=3Dself.autoCommit): self.autoCommit =3D commit; When executing it in Jython, I got the following error: >>> execfile("Test.py") Traceback (innermost last): File "<console>", line 1, in ? File "Test.py", line 1, in ? File "Test.py", line 4, in Test NameError: self Basically it complain about the Commit method signature. What's the correct way of doing this in Jython? Thanks. Yang |