Sorry, you're right. operator.index() sounds fine. --Guido
On 2/13/06, Alex Martelli <[EMAIL PROTECTED]> wrote: > On 2/13/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > ... > > I don't like to add a built-in index() at this point; mostly because > > of Occam's razor (we haven't found a need). > > I thought you had agreed, back when I had said that __index__ should > also be made easily available to implementors of Python-coded classes > implementing sequences, more elegantly than by demanding that they > code x.__index__() [I can't think offhand of any other special-named > method that you HAVE to call directly -- there's always some syntax or > functionality in the standard library to call it more elegantly on > your behalf]. This doesn't neessarily argue that index should be in > the built-ins module, of course, but I thought there was a sentiment > towards having it in either the operator or math modules. > > > Alex > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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