issue #477: Python <2.5 lacked any().

issue510
David Wilson 6 years ago
parent 3109abd518
commit 33caea06ed

@ -307,6 +307,16 @@ def to_text(o):
return UnicodeType(o)
# Python 2.4
try:
any
except NameError:
def any(it):
for elem in it:
if elem:
return True
def UnicodeType__rpartition(s, splitter):
"""
unicode.rpartition() for Python 2.4/2.5.

Loading…
Cancel
Save