Author: Alex Gaynor <[email protected]>
Branch: stdlib-2.7.11
Changeset: r83177:401daaffa88f
Date: 2016-03-19 23:43 -0400
http://bitbucket.org/pypy/pypy/changeset/401daaffa88f/
Log: Added typecheck in Row.__init__, like CPython does
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -1155,6 +1155,8 @@
class Row(object):
def __init__(self, cursor, values):
+ if not isinstance(cursor, Cursor):
+ raise TypeError("instance of cursor required for first argument")
self.description = cursor.description
self.values = values
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit