Re: [SQLObject] Overriding new()..._SO_new()?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Brad B. <br...@bb...> - 2003-10-10 20:45:22
|
On Friday, October 10, 2003, at 04:18 PM, Brad Bollenbach wrote: > On Friday, October 10, 2003, at 11:23 AM, Ian Bicking wrote: >>> Am I missing a way in which this can be done, or should SQLObject >>> have an _SO_new? >> >> You can override new() just like it is. (Though number 1 can >> probably be handled with a column default) > > Then what method do I call to access the "original" new once I've done > the overriding? When overriding columns, I'd just use the _SO_'s, but > when overriding new, it's unclear (to me, at least.) Sidnei pointed out that I could do: super(Transaction, cls).new() which, as it turns out, Does The Right Thing. But I wonder if those are the kind of semantics one would want to use (if "one" is "me", the answer is "No" because There Is No Superclass(TM), so it seems like a misleading hackaround.) Just my $0.02 CAD. -- Brad Bollenbach BBnet.ca |