[Zope-Checkins] CVS: Zope3/lib/python/Transaction - _defaultTransaction.py:1.1.2.6
Guido van Rossum
guido@python.org
Thu, 25 Apr 2002 23:49:47 -0400
Update of /cvs-repository/Zope3/lib/python/Transaction
In directory cvs.zope.org:/tmp/cvs-serv23801/lib/python/Transaction
Modified Files:
Tag: Zope-3x-branch
_defaultTransaction.py
Log Message:
Anticipate None becoming a keyword in Python 2.3. There are a few
functions with a default argument of the form None=None, as a speed
hack; this will break.
Note that in one case, None is not used in the function body; in
another case, None is used to pass an explicit 2nd arg to {}.get(),
but this defaults to None. Draw your own conclusions...
=== Zope3/lib/python/Transaction/_defaultTransaction.py 1.1.2.5 => 1.1.2.6 ===
else:
_t={}
- def get_transaction(_id=thread.get_ident, _t=_t, get=_t.get, None=None):
+ def get_transaction(_id=thread.get_ident, _t=_t, get=_t.get):
id=_id()
- t=get(id, None)
+ t=get(id)
if t is None: _t[id]=t=Transaction(id)
return t