On Dec 15, 2003, at 5:30 PM, Guenther Starnberger wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 15 December 2003 20:13, Ian Bicking wrote:
>
> hi,
>
>> Yes, it seems like classmethods are a little funny. I think I've
>> gotten it to work with super(MyClass).new(**kw)
>
> somehow this doesn't work (with python 2.2.3 - i haven't tried it with
> python
> 2.3 yet). AttributeError: 'super' object has no attribute 'new'.
maybe:
def new(cls, **kw):
yada yada
return super(MyClass, cls).new(**kw)
new = classmethod(new0
?
--
Ian Bicking | ia...@co... | http://blog.ianbicking.org
|