[Tim] > ... > A compile-time exception: when you're asking for semantics the compiler > can't give you, the presumption has to favor that you're in big trouble. > You can't catch such an exception directly in the same module (because it > occurs at compile time), but can catch it if you import the module from > elsewhere. Relatedly, you could do: try: compile("from __future__ import whatever", "", "exec") except whatever2: whatever3 else: whatever4 Then the future_stmt's compile-time is your module's runtime. still-looks-pretty-useless-to-me-though-ly y'rs - tim
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