Message188644
As for why to not return 1, I can imagine code that checks cpu_count, and only if it returns the "don't know" result would it invoke some more expensive method of determining the CPU count on platforms that cpu_count doesn't support. Since the os module is the home for "close to the metal" (well, OS) functions, I agree that it does not make sense to throw away the information that cpu_count can't actually determine the CPU count. Contrawise, I could see the multiprocessing version returning 1, since it is a higher level API and os.cpu_count would be available for those wanting the "don't know" info. |
|
Date |
User |
Action |
Args |
2013-05-07 12:34:39 | r.david.murray | set | recipients:
+ r.david.murray, pitrou, vstinner, nedbat, trent, ezio.melotti, neologix, kushal.das |
2013-05-07 12:34:39 | r.david.murray | set | messageid: <1367930079.05.0.0490049748478.issue17914@psf.upfronthosting.co.za> |
2013-05-07 12:34:39 | r.david.murray | link | issue17914 messages |
2013-05-07 12:34:38 | r.david.murray | create | |
|