Bug with super() and reload()?
Jp Calderone
exarkun at intarweb.us
Thu Jan 16 12:00:49 EST 2003
More information about the Python-list mailing list
Thu Jan 16 12:00:49 EST 2003
- Previous message (by thread): Bug with super() and reload()?
- Next message (by thread): Bug with super() and reload()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jan 16, 2003 at 01:48:22PM +0100, Thomas Heller wrote: > I stumbled over the following problem with super() and reload(). > > Consider this module: > > [snip code] > > prints this traceback: > > Y.test > Traceback (most recent call last): > File "<stdin>", line 8, in ? > File "mod.py", line 8, in test > super(Y, self).test() > TypeError: super(type, obj): obj must be an instance or subtype of type > > Thinking hard, I can understand why this traceback occurs: The object > 'y' is not an instance of the 'Y' refered to in the source code. > > Should this be considered a bug, or is it simply a wart, and reload > should be avoided? One could look at it as a wart, though I personally wouldn't. Regardless, it can be worked around. See twisted.python.rebuild (http://www.twistedmatrix.com) for an example of how ;) Jp -- There are 10 kinds of people: those who understand binary and those who do not. -- 12:00am up 31 days, 9:48, 2 users, load average: 0.07, 0.09, 0.04 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-list/attachments/20030116/d4ce9cc6/attachment.sig>
- Previous message (by thread): Bug with super() and reload()?
- Next message (by thread): Bug with super() and reload()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list