Author ezio.melotti
Recipients ezio.melotti, kushal.das, nedbat, neologix, pitrou, trent, vstinner
Date 2013-05-07.07:28:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367911693.38.0.443206232715.issue17914@psf.upfronthosting.co.za>
In-reply-to
Content
Returning None sounds reasonable to me.
Raising an exception pretty much means that the function should always be called in a try/except (unless you are sure that the code is running on an OS that knows the number of CPUs).  Returning -1 is not very Pythonic, and between 0 and None I prefer the latter, since it's IMHO a clearer indication that the value couldn't be determined.
History
Date User Action Args
2013-05-07 07:28:13ezio.melottisetrecipients: + ezio.melotti, pitrou, vstinner, nedbat, trent, neologix, kushal.das
2013-05-07 07:28:13ezio.melottisetmessageid: <1367911693.38.0.443206232715.issue17914@psf.upfronthosting.co.za>
2013-05-07 07:28:13ezio.melottilinkissue17914 messages
2013-05-07 07:28:13ezio.melotticreate