[Zodb-checkins] CVS: ZODB3/ZODB - Transaction.py:1.52

Jeremy Hylton jeremy at zope.com
Thu Oct 2 18:11:28 EDT 2003


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv24960

Modified Files:
	Transaction.py 
Log Message:
Get rid of default argument optimization.


=== ZODB3/ZODB/Transaction.py 1.51 => 1.52 ===
--- ZODB3/ZODB/Transaction.py:1.51	Thu Oct  2 16:17:36 2003
+++ ZODB3/ZODB/Transaction.py	Thu Oct  2 18:11:28 2003
@@ -459,24 +459,24 @@
 except:
     _t = Transaction(None)
 
-    def get_transaction(_t=_t):
+    def get_transaction():
         return _t
 
-    def free_transaction(_t=_t):
+    def free_transaction():
         _t.__init__()
 
 else:
     _t = {}
 
-    def get_transaction(_id=thread.get_ident, _t=_t, get=_t.get):
-        id = _id()
-        t = get(id, None)
+    def get_transaction():
+        id = thread.get_ident()
+        t = _t.get(id, None)
         if t is None:
             _t[id] = t = Transaction(id)
         return t
 
-    def free_transaction(_id=thread.get_ident, _t=_t):
-        id = _id()
+    def free_transaction():
+        id = thread.get_ident()
         try:
             del _t[id]
         except KeyError:




More information about the Zodb-checkins mailing list