Charles-François Natali added the comment:

> I think the idiom `os.cpu_count() or 1` should be mentioned in the 
> documentation an officially recommended. Otherwise people will produce a 
> non-portable code which works on their developer's computers but not on 
> exotic platforms.

And I maintain it's an ugly idiom ;-)
Since the user can't do anything except falling back to 1,
os.cpu_count() should always return a positive number (1 by default).
That's AFAICT what all other platforms (Java, Ruby, etc) do, because
it makes sense.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17914>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to