From: <pa...@su...> - 2004-11-27 21:13:00
|
Hi, following this tread: http://sourceforge.net/mailarchive/forum.php?forum_id=30269&style=flat&viewday=15&viewmonth=200312 I did override the new method of my classes to set up attributes beforehand like so: def new(cls, **kw): dostuff_here() .... return super(MyClass, cls).new(**kw) new = classmethod(new) Having upgraded python (from 2.2 to 2.3) and probably sqlobject (not sure cause I used svn before... now its what gentoo calls 0.6) the above broke my app. File "/mnt/data/projects/pki/certs.py", line 189, in new obj = super(CertItem, cls).new(**kw) AttributeError: 'super' object has no attribute 'new It looks like the SQLObject class has no new() method anymore ;(. Is there a way to get this functionality back? Do I have to override __init__ now? (I recall having read to not doing so, but it seems natural since instances are now created like inst = SQLObject(**kw)) thanks Paul ' |