STINNER Victor <vstin...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue35348>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to