Dj Gilcrease wrote: > executor = executors.create(NAME, *args, **kwargs) # NAME is 'process' > or 'thread' by default > > from concurrent.futures import executors, ExecutorBase > class MyExecutor(ExecutorBase): ... > executors.register(NAME, MyExecutor) I don't understand the reason for using a registration system rather than just importing names from a module. You mentioned wanting to globally change the executor class being used by a program without having to make changes throughout. Registering a different class under the same name would be one way to do that, but you could achieve the same thing just by assigning to a name in a module. In other words, instead of inventing your own mechanism for managing a namespace, just use a module as your namespace. -- Greg
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