On Monday 16 January 2006 20:05, Nick Coghlan wrote: > For example, what's wrong with "hasattr(x, __int__)"? That works > for all the builtin types, and, IMO, anyone defining a direct > conversion to an integer for a non-numeric type deserves whatever > happens to them. What about something that's got something like: def __int__(self): raise TypeError("This type is not a number!") I don't see a problem with defining basenumber. For the use cases, pretty much the same set as basesstring. -- Anthony Baxter <anthony at interlink.com.au> It's never too late to have a happy childhood.
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