New submission from Mark Dickinson: 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/ ---------- messages: 273020 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: bool % int has inconsistent return type. type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27792> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com