Tim Peters wrote: > [Guido] > >>I have a tentative fix for this (use PyNumber_Check() in >>default_3way_compare() and augment PyNumber_Check() to test whether >>the type defines nb_int). > > Sounds good to me. +1 > It's interesting then that complex numbers will pass the > PyNumber_Check test because they set nb_int to a routine that > unconditionally raises an exception. Checking for nb_negative may be > crisper? Isn't that caveat in the complex implementation ? Converting a complex with 0 img part would not cause any loss of information (apart from the usual integer truncations ;-) -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Feb 19 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2003, Oxford: 41 days left EuroPython 2003, Charleroi, Belgium: 125 days left
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