[Python-Dev] Can someone look at dummy_thread (#622537)? (original) (raw)
Tim Peters tim.one@comcast.net
Tue, 03 Dec 2002 22:12:29 -0500
- Previous message: [Python-Dev] Can someone look at dummy_thread (#622537)?
- Next message: [Python-Dev] Can someone look at dummy_thread (#622537)?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Guido]
I don't propose to automate this. I propose this:
try: import threading except ImportError: import dummythreading as threading
...
[Brett Cannon]
Do you prefer I do a separate
dummythreading
module or follow Martin's suggestions and just turndummythread
into athreading
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.
- Previous message: [Python-Dev] Can someone look at dummy_thread (#622537)?
- Next message: [Python-Dev] Can someone look at dummy_thread (#622537)?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]