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 mark.dickinson
Recipients arigo, loewis, mark.dickinson
Date 2011-02-09.20:40:07
SpamBayes Score 5.6508034e-09
Marked as misclassified No
Message-id <1297284009.08.0.894852336514.issue11144@psf.upfronthosting.co.za>
In-reply-to
Content
This turns out to be a one-line fix (modulo comments and tests); see attached patch.  The new code depends on the assumption that C longs are represented using two's complement, but note that this assumption is (a) already present elsewhere in the Python core (e.g., in the definition of bitwise operations for ints), and (b) universally true in practice (as far as I'm aware).  For theoretical completeness, it would be easy to write a different test for ones' complement and sign-magnitude machines, but in practice that seems pointless, and given the near-impossibility of testing that code, I left it out.
History
Date User Action Args
2011-02-09 20:40:09mark.dickinsonsetrecipients: + mark.dickinson, loewis, arigo
2011-02-09 20:40:09mark.dickinsonsetmessageid: <1297284009.08.0.894852336514.issue11144@psf.upfronthosting.co.za>
2011-02-09 20:40:08mark.dickinsonlinkissue11144 messages
2011-02-09 20:40:08mark.dickinsoncreate