On Fri, Feb 10, 2006, Thomas Wouters wrote: > > I have a slight reservation about the name. On the one hand it's clear the > canonical use will be for indexing sequences, and __index__ doesn't look > enough like __int__ to get people confused on the difference. On the other > hand, there are other places (in C) that want an actual int, and they could > use __index__ too. Even more so if a PyArg_Parse* grew a format for 'the > index-value for this object' ;) > > On the *other* one hand, I can't think of a good name... but on the other > other hand, it would be awkward to have to support an old name just because > the real use wasn't envisioned yet. Can you provide a couple of examples where you think you'd want __index__ functionality but the name would be inappropriate? -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "19. A language that doesn't affect the way you think about programming, is not worth knowing." --Alan Perlis
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