File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434]
3535
3636
37- _have__interpreters = False
37+ _interpreters = None
3838
3939try :
4040 import _interpreters
41- _have__interpreters = True
4241except ModuleNotFoundError :
4342 pass
4443
45- if _have__interpreters :
44+ if _interpreters :
4645 __all__ .append ('InterpreterPoolExecutor' )
4746
4847
@@ -54,16 +53,14 @@ def __getattr__(name):
5453 global ProcessPoolExecutor , ThreadPoolExecutor , InterpreterPoolExecutor
5554
5655 if name == 'ProcessPoolExecutor' :
57- from .process import ProcessPoolExecutor as pe
58- ProcessPoolExecutor = pe
59- return pe
56+ from .process import ProcessPoolExecutor
57+ return ProcessPoolExecutor
6058
6159 if name == 'ThreadPoolExecutor' :
62- from .thread import ThreadPoolExecutor as te
63- ThreadPoolExecutor = te
64- return te
60+ from .thread import ThreadPoolExecutor
61+ return ThreadPoolExecutor
6562
66- if _have__interpreters and name == 'InterpreterPoolExecutor' :
63+ if _interpreters and name == 'InterpreterPoolExecutor' :
6764 from .interpreter import InterpreterPoolExecutor
6865 return InterpreterPoolExecutor
6966
You can’t perform that action at this time.
0 commit comments