On 2/13/06, Guido van Rossum <guido at python.org> 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4