]> granicus.if.org Git - python/commit
Change filterstring() and filterunicode(): If the
authorWalter Dörwald <walter@livinglogic.de>
Mon, 10 Feb 2003 13:19:13 +0000 (13:19 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Mon, 10 Feb 2003 13:19:13 +0000 (13:19 +0000)
commit1918f7755e03900224c5a53cca9fc0088c3186d3
tree0c2ac8d1d8373699f5d431c88c4960f9bc6849ee
parentb4bb64e2882297f4759e5d4e6758100d8e9f3273
Change filterstring() and filterunicode(): If the
object is not a real str or unicode but an instance
of a subclass, construct the output via looping
over __getitem__. This guarantees that the result
is the same for function==None and function==lambda x:x

This doesn't happen for tuples, because filtertuple()
uses PyTuple_GetItem().

(This was discussed on SF bug #665835).
Lib/test/test_builtin.py
Python/bltinmodule.c