> PyDict_Size() sets an exception and returns 0 if it is passed NULL or a > non-dict. Is this a bug? It seems like it should return -1, otherwise > you'd have to distinguish between an empty dict and an error by calling > PyErr_Occurred(). Looks like an (old) bug to me. All other similar cases return NULL or -1, and some calls to PyDict_Size() actually check for < 0. (Many calls don't check for errors, but those probably "know" that they are dealing with a dict and maintain that invariant in other ways.) --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