In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > >Unfortunately, if we should follow the recent advice about always using >"super()" in the __init__ method, it's hard to do what you suggest >(though it sounds like good advice) without resorting to extreme >ugliness: > > >>> class Classic: >... def __init__(self): >... super(Classic, self).__init__() >... > >>> c = Classic() >Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "<stdin>", line 3, in __init__ >TypeError: super() argument 1 must be type, not classobj > >Could classic classes ever be removed without us having manually >to fix all __init__ calls to the superclass?
Maybe. If you follow the python-dev thread about "super() considered harmful", you'll learn that Guido believes super() should only be used with class hierarchies explicitly designed for the purpose. Given that, you'd have to do a lot of other changes to support super() and it's less outrageous. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "19. A language that doesn't affect the way you think about programming, is not worth knowing." --Alan Perlis -- http://mail.python.org/mailman/listinfo/python-list