This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients lemburg, ned.deily, pitrou, ronaldoussoren
Date 2011-03-13.11:58:53
SpamBayes Score 2.0927704e-14
Marked as misclassified No
Message-id <1300017535.51.0.381517096358.issue10735@psf.upfronthosting.co.za>
In-reply-to
Content
W.r.t the MachO name: I misread the patch, MachO is fine as the name for the reasons you mention.

I'm not convinced that your hack to make bits return the pointer size of the currently running architecture when testing sys.executable is useful, especially because the behaviour is inconsistent (it doesn't work for other executables) and also does something different than the document behaviour.

I'd prefer to return all pointer sizes supported by the binary, even if that can be surprising for users not used to fat binaries. This can easily be accomplished by added the calculation of 'bits' to the elif branch below:

+ elif ('Mach-O executable' in fileout
+            or 'Mach-O 64-bit executable' in fileout):

Using sys.maxsize or struct.calcsize("P") are both good ways of determining the actual size, and if there is a real need we could add a function that explicitly returns the pointer size (although I don't think that such a function is really necessary).
History
Date User Action Args
2011-03-13 11:58:55ronaldoussorensetrecipients: + ronaldoussoren, lemburg, pitrou, ned.deily
2011-03-13 11:58:55ronaldoussorensetmessageid: <1300017535.51.0.381517096358.issue10735@psf.upfronthosting.co.za>
2011-03-13 11:58:53ronaldoussorenlinkissue10735 messages
2011-03-13 11:58:53ronaldoussorencreate