Message188911
> 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. |
|
Date |
User |
Action |
Args |
2013-05-11 12:24:49 | neologix | set | recipients:
+ neologix, pitrou, vstinner, nedbat, trent, ezio.melotti, r.david.murray, serhiy.storchaka, kushal.das, Yogesh.Chaudhari |
2013-05-11 12:24:49 | neologix | link | issue17914 messages |
2013-05-11 12:24:49 | neologix | create | |
|