M
Michael P. Soulier
Ok, this works in Python on Windows, but here on Linux, with Python 2.4.1, I'm
getting an error.
The docs say:
A typical use for calling a cooperative superclass method is:
class C(B):
def meth(self, arg):
super(C, self).meth(arg)
However, when I try this, which works on windows, with ActiveState
ActivePython 2.4.0...
class RemGuiFrame(RemGlade.RemFrame):
"""This class is the top-level frame for the application."""
def __init__(self, *args, **kwds):
"Class constructor."
# Constructor chaining
super(RemGuiFrame, self).__init__(*args, **kwds)
...on linux I get this...
[msoulier@piglet pysrc]$ ./RemGui.py
Traceback (most recent call last):
File "./RemGui.py", line 206, in ?
frame_1 = RemGuiFrame(None, -1, "")
File "./RemGui.py", line 30, in __init__
super(RemGuiFrame, self).__init__(*args, **kwds)
TypeError: super() argument 1 must be type, not classobj
Why the difference? Is Python portability overrated? Is this a bug?
I'm confused.
Mike
--
Michael P. Soulier <[email protected]>
http://www.digitaltorque.ca
http://opag.ca python -c 'import this'
Jabber: (e-mail address removed)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCtH6hKGqCc1vIvggRAqJAAJ9gV/XDjyOGYAgC4f4xU3U7wuRKXwCfRW/K
InT8GPVSfY3vIp343BJlqlg=
=utmQ
-----END PGP SIGNATURE-----
getting an error.
The docs say:
A typical use for calling a cooperative superclass method is:
class C(B):
def meth(self, arg):
super(C, self).meth(arg)
However, when I try this, which works on windows, with ActiveState
ActivePython 2.4.0...
class RemGuiFrame(RemGlade.RemFrame):
"""This class is the top-level frame for the application."""
def __init__(self, *args, **kwds):
"Class constructor."
# Constructor chaining
super(RemGuiFrame, self).__init__(*args, **kwds)
...on linux I get this...
[msoulier@piglet pysrc]$ ./RemGui.py
Traceback (most recent call last):
File "./RemGui.py", line 206, in ?
frame_1 = RemGuiFrame(None, -1, "")
File "./RemGui.py", line 30, in __init__
super(RemGuiFrame, self).__init__(*args, **kwds)
TypeError: super() argument 1 must be type, not classobj
Why the difference? Is Python portability overrated? Is this a bug?
I'm confused.
Mike
--
Michael P. Soulier <[email protected]>
http://www.digitaltorque.ca
http://opag.ca python -c 'import this'
Jabber: (e-mail address removed)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCtH6hKGqCc1vIvggRAqJAAJ9gV/XDjyOGYAgC4f4xU3U7wuRKXwCfRW/K
InT8GPVSfY3vIp343BJlqlg=
=utmQ
-----END PGP SIGNATURE-----