> > Maybe, as long as we all agree that that's *exactly* what they check > > for, and as long as we agree that there may be overlapping areas > > (where two or more of these will return True). > > > > PyMapping_Check() returns true for a variety of non-mappings like > > strings, lists, and all classic instances. > > Perhaps we should simply keep the existing semantics for > those two APIs, that is, ensure that they return the same > results for the standard builtin types as they did in Python 2.2 > and below ?! That's a new way of defining their semantics, but I can agree with it! > This would mean that a special case would have to be added > to PyNumber_Check() to have it return False for strings > and Unicode. Somebody (MWH?) proposed to test for one or nb_int/nb_long/nb_float. That makes sense to me, and should do what you ask for. --Guido van Rossum (home page: http://www.python.org/~guido/)
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