[Zope-CVS] CVS: Products/Ape/lib/apelib/sql - dbapi.py:1.4

Shane Hathaway shane at zope.com
Mon Aug 11 14:51:43 EDT 2003


Update of /cvs-repository/Products/Ape/lib/apelib/sql
In directory cvs.zope.org:/tmp/cvs-serv24767/sql

Modified Files:
	dbapi.py 
Log Message:
Added a _data argument to execute().

The execute() method now accepts a _data argument which callers can
use instead of keyword arguments, for the purpose of avoiding clashes
with other argument names.


=== Products/Ape/lib/apelib/sql/dbapi.py 1.3 => 1.4 ===
--- Products/Ape/lib/apelib/sql/dbapi.py:1.3	Sun May 18 00:23:14 2003
+++ Products/Ape/lib/apelib/sql/dbapi.py	Mon Aug 11 13:51:38 2003
@@ -78,11 +78,15 @@
         self.query_cache[(table_name, column_defs, operation)] = query
         return query
 
-    def execute(self, query, fetch=0, cursor=None, **kw):
+    def execute(self, query, fetch=0, cursor=None, _data=None, **kw):
         if cursor is None:
             cursor = self.cursor
             if cursor is None:
                 raise RuntimeError('Not connected')
+        if _data is not None:
+            # Callers can pass _data instead of keyword arguments
+            # to avoid argument name conflicts.
+            kw.update(_data)
         if DEBUG or PROFILE:
             if kw:
                 print 'Query: %s, %s' % (repr(query), kw)




More information about the Zope-CVS mailing list