Commit 6934ad09 authored by Stefan Behnel's avatar Stefan Behnel

cleanup

parent 434348c6
...@@ -290,12 +290,12 @@ def endswith(unicode s, sub): ...@@ -290,12 +290,12 @@ def endswith(unicode s, sub):
>>> PY_VERSION < (2,5) or text.endswith(('fsdf', 'fsdf ')) >>> PY_VERSION < (2,5) or text.endswith(('fsdf', 'fsdf '))
True True
>>> endswith(text, ('fsdf', 'fsdf ')) == 'MATCH' >>> endswith(text, ('fsdf', 'fsdf '))
True 'MATCH'
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf', 'fsdf X')) >>> PY_VERSION < (2,5) or not text.endswith(('fsdf', 'fsdf X'))
True True
>>> endswith(text, ('fsdf', 'fsdf X')) == 'NO MATCH' >>> endswith(text, ('fsdf', 'fsdf X'))
True 'NO MATCH'
""" """
if s.endswith(sub): if s.endswith(sub):
return 'MATCH' return 'MATCH'
...@@ -321,12 +321,12 @@ def endswith_start_end(unicode s, sub, start, end): ...@@ -321,12 +321,12 @@ def endswith_start_end(unicode s, sub, start, end):
>>> PY_VERSION < (2,5) or text.endswith(('fsd', 'fsdf'), 10, len(text)-1) >>> PY_VERSION < (2,5) or text.endswith(('fsd', 'fsdf'), 10, len(text)-1)
True True
>>> endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1) == 'MATCH' >>> endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1)
True 'MATCH'
>>> PY_VERSION < (2,5) or not text.endswith(('fsdf ', 'fsdf X'), 10, len(text)-1) >>> PY_VERSION < (2,5) or not text.endswith(('fsdf ', 'fsdf X'), 10, len(text)-1)
True True
>>> endswith_start_end(text, ('fsdf ', 'fsdf X'), 10, len(text)-1) == 'NO MATCH' >>> endswith_start_end(text, ('fsdf ', 'fsdf X'), 10, len(text)-1)
True 'NO MATCH'
""" """
if s.endswith(sub, start, end): if s.endswith(sub, start, end):
return 'MATCH' return 'MATCH'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment