On Thu, Feb 09, 2006 at 03:39:46PM -0800, Aahz wrote: > Can you provide a couple of examples where you think you'd want __index__ > functionality but the name would be inappropriate? Not really, or I wouldn't have had only a _slight_ reservation :) There are many functioncalls and methodcalls that only take integers, though, and they all currently use int() on their argument. file.read, socket.recv, signal.signal, str.zfill/center/ljust -- basically anything that uses the 'i' PyArg_Parse* format specifier, which is quite a lot. For a great many of them it will not make sense to pass objects that don't have an appropriate __int__, but who knows howmany really *mean* to ask for __index__ instead. I mostly voice the reservation to lure out people with actual reservations ;) -- Thomas Wouters <thomas at xs4all.net> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
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