Another try at Python's selfishness

Terry Reedy tjreedy at udel.edu
Sat Feb 4 03:15:24 EST 2006


"Jean-Paul Calderone" <exarkun at divmod.com> wrote in message 
news:20060203211426.2697.1835776858.divmod.quotient.6256 at ohm...
> I'm not sure I follow.  Surely you're not suggesting that this doesn't 
> work:
>
>    >>> class X:
>    ...     def foo(self):
>    ...         print 'X.foo', self
>    ...
>    >>> class A(X):
>    ...     pass
>    ...
>    >>> o = A()
>    >>> A.foo(o)
>    X.foo <__main__.A instance at 0xb7cab64c>
>    >>>

Either things have changed or I was misinformed and neglected to verify ;-(






More information about the Python-list mailing list