On Mon, Jan 25, 2010 at 06:34:06PM +0100, Sophana K wrote:
> In all cases, it looks like Transaction.__getattr__ gets called at
> places I don't understand.
> I don't understand very well what is the function of the
> Transaction.__getattr__ method.

   Transaction.__getattr__ redirects attribute access to the underlying
connection (self._dbConnection); non-method attributes are wrapped into
ConnWrapper instances; method access are wrapped as instancemethod with
fake class - the class is self.__class__ (Transaction), not the class of
the connection (self._dbConnection); the last one is neccessary to
redirect attribute access on self._dbConnection back to the transaction
instance.

Oleg.
-- 
     Oleg Broytman            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to