Re: [SQLObject] Odd __connection__ problem
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2004-02-05 16:42:46
|
Bruno Trevisan wrote: > On Wed, 4 Feb 2004, Ian Bicking wrote: >>I'm not really confident about __connection__ in general, it seems kind >>of fragile. > > > So, given that, is there any problems about adding _connection to > persistent class constructors instead of using __connection__ in the > module context (apart from the obvious code repetition) ? No, you can add it to the superclass as well, or assign it to the superclass, like SuperClass._connection = ..., and all subclasses should pick it up (so long as you haven't instantiated any of them of course). Ian |