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 ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "19. A language that doesn't affect the way you think about programming, is not worth knowing." --Alan Perlis _______________________________________________ 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