[ZODB-Dev] Re: SVN: ZODB/branches/anguenot-ordering-beforecommitsubscribers/src/transaction/ Implements the ordering of before commit subscribers :

Tim Peters tim at zope.com
Mon Aug 8 13:41:07 EDT 2005


[Julien Anguenot]
> Zope3 seems to use one (1) underscore as a suffix like in :
>
> See for instance this :
>
http://svn.zope.org/Zope3/trunk/src/zope/app/component/metaconfigure.py?rev=
37586&view=auto
>
> """ def subscriber(_context, for_=None, factory=None, handler=None,
> provides=None, permission=None, trusted=False, locate=False):
> """

That's a semi-standard convention for dealing with names that conflict with
Python keywords (it's a syntax error to name an argument "for" -- or "def"
or "while", etc).

> But here, the problem is, as well, the method's signature and backward
> compatibility for the beforeCommitHook() method since the only way to do
> it would be to extract the "order_" from the **kws and then remove it
> before storing the hook info in the data structure which doesn't provide
> really a nice implementation in my opinion...

Yup, it gets ugly ;-)



More information about the ZODB-Dev mailing list