This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients Yogesh.Chaudhari, ezio.melotti, kushal.das, nedbat, neologix, pitrou, r.david.murray, serhiy.storchaka, trent, vstinner
Date 2013-05-11.12:24:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM0rCKiwhK71nkZyUDufjfyL6NN9hSgRDwadKt5YMvbKJw@mail.gmail.com>
In-reply-to <1368274434.78.0.652963479501.issue17914@psf.upfronthosting.co.za>
Content
> 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.
History
Date User Action Args
2013-05-11 12:24:49neologixsetrecipients: + neologix, pitrou, vstinner, nedbat, trent, ezio.melotti, r.david.murray, serhiy.storchaka, kushal.das, Yogesh.Chaudhari
2013-05-11 12:24:49neologixlinkissue17914 messages
2013-05-11 12:24:49neologixcreate