[Guido] >>>> I don't propose to automate this. I propose this: >>>> >>>> try: >>>> import threading >>>> except ImportError: >>>> import dummy_threading as threading ... [Brett Cannon] > Do you prefer I do a separate ``dummy_threading`` module or follow > Martin's suggestions and just turn ``dummy_thread`` into > a ``threading`` substitute itself? Looking at his code, I think it's clear he wants a separate dummy_threading.py and nothing fancier than that. The idiomatic use would be as shown, where a user who knows what they're doing can import dummy_threading (if desired) and *name* it threading locally themself (if desired). No existing code could break, except for users who already have a file named dummy_threading.py on their PYTHONPATH somewhere after the std library.
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