[Python-Dev] Class Methods
Moshe Zadka
moshez at zadka.site.co.il
Fri Apr 20 20:32:57 EDT 2001
On Fri, 20 Apr 2001 11:26:01 -0500, Guido van Rossum <guido at digicool.com> wrote:
> For regular methods it may be possible to avoid this simply by
> choosing non-conflicting names, but I seem to recall that Jim wanted
> to use class methods with certain special names (like __init__ or
> __getattr__?), and I have no idea how to do this without dropping the
> idea that x.spam(...) is C.spam(x, ...). So maybe that's the
> solution?
class A:
def __init__(self):
self.spam = 1
class B:
def __init__(self):
A.__init__(self)
self.eggs = 2
--
"I'll be ex-DPL soon anyway so I'm |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
-- Wichert Akkerman (on debian-private)| easier, more seductive.
For public key, finger moshez at debian.org |http://www.{python,debian,gnu}.org
More information about the Python-list
mailing list