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 mark.dickinson
Date 2016-08-18.12:09:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za>
In-reply-to
Content
Seen on reddit [1]: 

>>> True % 1
0
>>> True % 2
True

I believe that we should be returning an int in both these cases; this looks like a longobject.c fast path gone wrong.

[1] https://www.reddit.com/r/learnpython/comments/4y5bh1/can_someone_explain_why_true_1_0_but_true_2_true/
History
Date User Action Args
2016-08-18 12:09:44mark.dickinsonsetrecipients: + mark.dickinson
2016-08-18 12:09:44mark.dickinsonsetmessageid: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za>
2016-08-18 12:09:44mark.dickinsonlinkissue27792 messages
2016-08-18 12:09:43mark.dickinsoncreate