On Nov 6, 2011, at 12:49 AM, Petri Lehtinen wrote:

> Currently, find(), rfind(), index(), rindex(), count(), startswith()
> and endswith() of str, bytes and bytearray accept None. Should
> list.index() and tuple.index() accept it, too?

The string methods accept None as a historical artifact
of being in string.py where optional arguments defaulted to None.
That doesn't imply that you should change every other API that
accepts a start argument.

The list.index() API is ancient and stable.  There has been little or
no demonstrated need for its start argument to be None.

Also, the list API does not exist in isolation.  It shows up in
strings, the sequence ABC, and every API that aspires to
be list-like. 

Overall, I'm -1 on this change and find it to be gratuitous.
We have *way* to many micro API changes of dubious benefit.

Also, the change should not have been applied to Py2.7 and Py3.2.
We don't backport API changes.   That would just make Jython
and IronPython become non-compliant in mid-stream.


Raymond


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to