[Zodb-checkins] CVS: Zope2/lib/python/ZODB - Connection.py:1.56
jeremy@digicool.com
jeremy@digicool.com
Tue, 22 May 2001 19:21:23 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/ZODB
In directory korak.digicool.com:/tmp/cvs-serv8648
Modified Files:
Connection.py
Log Message:
Remove many unused default argument definitions used as speed optimizations.
Many methods had default arguments that were used to bind a global or
builtin name, like type, None, or type(''), as a local name. In many
cases, the names bound were not referenced in the method body
(presumably they used to be referenced).
commit_sub(): In this one case, delete the default arg anyway, because
it's only used once.
--- Updated File Connection.py in package Zope2/lib/python/ZODB --
--- Connection.py 2001/05/22 20:57:03 1.55
+++ Connection.py 2001/05/22 23:21:22 1.56
@@ -152,7 +152,7 @@
except: pass
def __getitem__(self, oid,
- tt=type(()), ct=type(HelperClass)):
+ tt=type(())):
cache=self._cache
if cache.has_key(oid): return cache[oid]
@@ -193,8 +193,7 @@
return object
def _persistent_load(self,oid,
- d={'__builtins__':{}},
- tt=type(()), st=type(''), ct=type(HelperClass)):
+ tt=type(())):
__traceback_info__=oid
@@ -300,7 +299,7 @@
self.__onCommitActions.append((method_name, args, kw))
get_transaction().register(self)
- def commit(self, object, transaction, _type=type, _st=type('')):
+ def commit(self, object, transaction):
if object is self:
# We registered ourself. Execute a commit action, if any.
if self.__onCommitActions is not None:
@@ -432,11 +431,10 @@
self._handle_serial(s, oid)
- def commit_sub(self, t,
- _type=type, _st=type(''), _None=None):
+ def commit_sub(self, t):
"""Commit all work done in subtransactions"""
tmp=self._tmp
- if tmp is _None: return
+ if tmp is None: return
src=self._storage
LOG('ZODB', BLATHER,
@@ -514,7 +512,7 @@
def root(self): return self['\0\0\0\0\0\0\0\0']
- def setstate(self,object):
+ def setstate(self, object):
try:
oid=object._p_oid
@@ -577,8 +575,7 @@
unpickler.load()
return unpickler.load()
- def setklassstate(self, object,
- tt=type(()), ct=type(HelperClass)):
+ def setklassstate(self, object):
try:
oid=object._p_oid
__traceback_info__=oid