[ python-Bugs-1520176 ] non-uniform behavior in 'startswith' / 'endswith'
SourceForge.net
noreply at sourceforge.net
Tue Aug 8 04:20:32 CEST 2006
Bugs item #1520176, was opened at 2006-07-10 12:49
Message generated for change (Comment added) made by sf-robot
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: Closed
Resolution: None
Priority: 5
Submitted By: Milind (t-milich)
Assigned to: Raymond Hettinger (rhettinger)
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
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2006-08-07 19:20
Message:
Logged In: YES
user_id=1312539
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Georg Brandl (gbrandl)
Date: 2006-07-10 13:15
Message:
Logged In: YES
user_id=849994
The current code shortcuts if it finds a match, so I think
this is not a bug. Raymond?
----------------------------------------------------------------------
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