BTW. A related problem with platform.architecture() is that it doesn't know how to deal with fat binaries (such as those found on macOS).
As an example:
$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 2 architectures: [i386:Mach-O executable i386] [x86_64:Mach-O 64-bit executable x86_64]
/usr/bin/python (for architecture i386): Mach-O executable i386
/usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64
This will be reported as "64-bit" by platform.architecture() because there is '64-bit' in the output of file(1).
Using sizeof(void*) or sys.maxsize suffers from the a simular problem: this will only detect the pointer-size of the current proces and not that the binary is capable of running with a different pointer-size as well.
P.S. platform.architecture() uses file(1) because you can specify different executables than sys.executable.