A simpler super.
Syver Enstad
syver-en+usenet at online.no
Fri Apr 12 09:51:30 EDT 2002
This works on 2.2.1 (as far as I have tested) when yourself is a class and when
yourself is an instance. Since I have limited experience with the
innards of Python, it would be nice if anyone could critique the
implementation.
def Super(yourself):
if isinstance(yourself, type): # for classes
return super(yourself, yourself)
return super(yourself.__class__, yourself)
--
Vennlig hilsen
Syver Enstad
More information about the Python-list
mailing list