On 8/24/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Until a few moments ago, I didn't know that str.startswith()
> had any optional arguments

I just looked them up, and they turn out to just be syntactic sugar
for a slice.  (Even to the extent of handling omitted arguments as
None.)  The stop argument in particular is (almost) silly.

  s.startswith(prefix, start, stop) === s[start:stop].startswith(prefix)

Ignoring efficiency concerns, would dropping the optional arguments
and requiring an explicit slice be a valid Py3K simplification?

-jJ
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to