Serhiy Storchaka added the comment: > Since the user can't do anything except falling back to 1, > os.cpu_count() should always return a positive number (1 by default).
In general I agree with you. Actually the os module should contains two functions: cpu_count() which fallbacks to 1 and is_cpu_counting_supported() for rare need. But this looks even more ugly and I choose single function even if in most cases I need use strange idiom. ---------- _______________________________________ 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