[ python-Bugs-1520176 ] non-uniform behavior in 'startswith' / 'endswith'
SourceForge.net
noreply at sourceforge.net
Mon Jul 10 21:49:26 CEST 2006
Bugs item #1520176, was opened at 2006-07-10 19:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520176&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Milind (t-milich)
Assigned to: Nobody/Anonymous (nobody)
Summary: non-uniform behavior in 'startswith' / 'endswith'
Initial Comment:
compare the two versions of 'endswith'.
Either both of them should throw TypeErorr or both
should return boolean value.
>>> 'abc'.endswith( ('abc',None))
True
>>> 'abc'.endswith( ('abc',None),4,3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected a character buffer object
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520176&group_id=5470
More information about the Python-bugs-list
mailing list