[pypy-commit] pypy default: use issequence_w here as well
fijal
noreply at buildbot.pypy.org
Wed Jul 13 20:44:12 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
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):
More information about the pypy-commit
mailing list