[Skip Montanaro] > It's not clear to me that you'd see any benefit anyway. The checking code > currently looks like this: > > if (o == NULL) > return null_error(); > > If you changed it to use assert you'd have > > assert(o != NULL); > > which expands to > > ((o != NULL) ? 0 : __assert(...)); > ... In the release build, Python arranges to #define the preprocessor NDEBUG symbol, which in turn causes assert() to expand to nothing (or maybe to (void)0, or something like that, depending on the compiler). That's standard ANSI C behavior for assert(). IOW, asserts cost nothing in a release build -- and don't do anything in a release build either.
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