Guido van Rossum <guido at python.org>: > Maybe PyBool_FromLong() itself could make this unneeded by adding > something like > > if (ok < 0 && PyErr_Occurred()) > return NULL; > > to its start? Not sure if it would be a good idea to encourage reliance on one API function doing error checking on behalf of others. I can see someone coming along later and adding some code in between whatever returned the result and the PyBool_FromLong call, not realising that doing so would upset the error checking. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
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