Author: Maciej Fijalkowski <[email protected]>
Branch: 
Changeset: r45569:2f59716baa22
Date: 2011-07-13 20:43 +0200
http://bitbucket.org/pypy/pypy/changeset/2f59716baa22/

Log:    use issequence_w here as well

diff --git a/pypy/module/cpyext/sequence.py b/pypy/module/cpyext/sequence.py
--- a/pypy/module/cpyext/sequence.py
+++ b/pypy/module/cpyext/sequence.py
@@ -22,7 +22,7 @@
 def PySequence_Check(space, w_obj):
     """Return 1 if the object provides sequence protocol, and 0 otherwise.
     This function always succeeds."""
-    return int(space.findattr(w_obj, space.wrap("__getitem__")) is not None)
+    return int(space.issequence_w(w_obj))
 
 @cpython_api([PyObject], Py_ssize_t, error=-1)
 def PySequence_Size(space, w_obj):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to