[issue35348] Problems with handling the file command output in platform.architecture()
STINNER Victor
report at bugs.python.org
Tue Dec 18 06:12:59 EST 2018
STINNER Victor <vstinner at redhat.com> added the comment:
Ok, I closed my PR 11186 which modified architecture() to only return struct.calcsize('P') if the executable argument is equal to sys.executable.
> please read the doc-string of the platform.architecture() function (or ask the person who wrote most of the module). It clearly refers to inspecting a specific executable and only uses the Python interpreter as default. The running process can provide some sane defaults, but is not necessarily using the same values as the given executable.
I see the platform module as a module to get info about the operating system and Python, but it seems like I misunderstood the purpose of the specific case of the architecture() function.
I propose a small addition to the doc to avoid confusion:
https://github.com/python/cpython/pull/11208/files
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35348>
_______________________________________
More information about the Python-bugs-list
mailing list