]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
SF bug 665835: filter() treatment of str and tuple inconsistent
authorRaymond Hettinger <python@rcn.com>
Thu, 24 Apr 2003 16:52:47 +0000 (16:52 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 24 Apr 2003 16:52:47 +0000 (16:52 +0000)
commit9928571f3f09ece9430c4eb503ac7e9188d1b185
tree2ebeef8113f1d705554fb74912aa3a4e67ebfb3c
parent3209410cb53457c0aa2facceb8d9a6ad24e1702d
SF bug 665835: filter() treatment of str and tuple inconsistent

As a side issue on this bug, it was noted that list and tuple iterators
used macros to directly access containers and would not recognize
__getitem__ overrides.  If the method is overridden, the patch returns
a generic sequence iterator which calls the __getitem__ method; otherwise,
it returns a high custom iterator with direct access to container elements.
Lib/test/test_types.py
Objects/listobject.c
Objects/tupleobject.c