Kapil Thangavelu wrote:

> ZOPE_HOME/lib/python/Shared/DC/ZRDB/TM.py
> 
> Glancing over the Transaction TM mixin class... i noticed a line
> commit=tpc_abort=tpc_begin
> 
> i can understand tpc_begin=commit, but the abort seems strange. 
> if an abort happens in the two phase commit the equality doesn't 
> make sense to me.
> 
> whats going on here? Is this meant to be overidden?

Yes. Override the methods that you need to. The rest are given a 
no-operation default implementation.

The class more or less defines an interface.

def tpc_begin(self, *ignored): pass
commit=tpc_abort=tpc_begin

The assignment you see is just a short-hand way of saying that commit, 
tpc_abort and tpc_begin have the same method signature and the same 
implementation


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to