[Python-Dev] Improved super/autosuper (original) (raw)
Guido van Rossum guido at python.org
Tue Jul 6 06:41:31 CEST 2004
- Previous message: [Python-Dev] Improved super/autosuper
- Next message: [Python-Dev] Improved super/autosuper
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> class A (autosuper): > > def init (self, a, b): > print 'A.init' > print a, b > self.super(a, b) > > def test (self, a, b): > print 'A.test' > print a, b > self.super(a, b) > > class B (A): > > def init (self): > print 'B.init' > self.super(1, 2) > self.super.test(3, 4)
One more thing... What is the point of self.super.test(...)? When is that not the same as self.test(...)? What's the use case?
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Improved super/autosuper
- Next message: [Python-Dev] Improved super/autosuper
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]