>> (2) The patch adds new functionality to use multiple processes in >> parallel. The normal parameter values are integers indicating how >> many processes to use. The parameter also needs two special values -- >> one to indicate "use os.cpu_count", and the other to indicate "don't >> use multiprocessing at all". >> >> (A) Is there a Best Practices for this situation, with two odd cases? > > > No. In this situation I would consider 0 or -1 for "use os.cpu_count' and > None for "don't use multi-processing". Why would the user care if multiprocessing is used behind the scene? It would be strange for processes=1 to fail if multiprocessing is not available. If you set a default value of 1, then compileall() will work regardless of whether multiprocessing is available. In short: processes <= 0: use os.cpu_count() processes == 1 (default): just use normal sequential compiling processes > 1: use multiprocessing There's no reason to introduce None. Or am I missing something?
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