>>>>> "M" == M <mal@lemburg.com> writes: M> Wouldn't a generic builtin for these kinds of things be M> better, e.g. a function returning a default value in case M> an exception occurs... something like: M> tryexcept(list.pop(), IndexError, default) M> which returns default in case an IndexError occurs. Don't think M> this would be much faster that the explicit try:...except: M> though... Don't know if this would be better (or useful, etc.), but it could possibly be faster than explicit try/except, because with try/except you have to instantiate the exception object. Presumably tryexcept() -- however it was spelled -- would catch the exception in C, thus avoiding the overhead of exception object instantiation. -Barry
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