[issue23747] platform module exposes win32_ver function on posix systems
Anand B Pillai added the comment: Similarly for mac_ver, java_ver etc.
platform.mac_ver() ('', ('', '', ''), '') platform.java_ver() ('', '', ('', '', ''), ('', '', ''))
Maybe it is okay if these functions are present, but can't they raise an exception or return None instead of returning these funny tuples when empty strings ? I am surprised at Python's inconsistency in such things. For example,
import winsound Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'winsound'
Works as expected on Linux. In the same vein, these functions shouldn't be present as well IMHO - I agree this is debatable of course. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23747> _______________________________________
STINNER Victor added the comment:
Maybe it is okay if these functions are present, but can't they raise an exception or return None instead of returning these funny tuples when empty strings ?
It would break the backward compatibility. Again, it's a delibarate choice. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23747> _______________________________________
participants (2)
-
Anand B Pillai
-
STINNER Victor