[pypy-commit] pypy default: simplify these functions

bdkearns noreply at buildbot.pypy.org
Wed Mar 6 01:42:23 CET 2013


Author: Brian Kearns <bdkearns at gmail.com>
Branch: 
Changeset: r62102:5e9db69947ee
Date: 2013-03-05 18:58 -0500
http://bitbucket.org/pypy/pypy/changeset/5e9db69947ee/

Log:	simplify these functions

diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -424,24 +424,15 @@
         return cur
 
     def executemany(self, *args):
-        self._check_closed()
-        cur = Cursor(self)
-        if self.row_factory is not None:
-            cur.row_factory = self.row_factory
+        cur = self.cursor()
         return cur.executemany(*args)
 
     def execute(self, *args):
-        self._check_closed()
-        cur = Cursor(self)
-        if self.row_factory is not None:
-            cur.row_factory = self.row_factory
+        cur = self.cursor()
         return cur.execute(*args)
 
     def executescript(self, *args):
-        self._check_closed()
-        cur = Cursor(self)
-        if self.row_factory is not None:
-            cur.row_factory = self.row_factory
+        cur = self.cursor()
         return cur.executescript(*args)
 
     @_check_closed_wrap


More information about the pypy-commit mailing list