homepage

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 serhiy.storchaka
Recipients benjamin.peterson, serhiy.storchaka
Date 2016年12月17日.09:37:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481967458.92.0.739722865425.issue28998@psf.upfronthosting.co.za>
In-reply-to
Content
Since implementing PEP 237 (Unifying Long Integers and Integers) in Python 2.4 int and long instances became interchangeable. Virtually any function that needs an integer, accepts both int and long. But there are few places where only int is accepted. Since it is easy unintentionally convert int to long (add and subtract large int, or add 0L), this can lead to subtle errors in rare circumstances.
Proposed patch makes few places that accepted only int accepting long too. This mainly is changing isinstance(x, int) to isinstance(x, (int, long)).
History
Date User Action Args
2016年12月17日 09:37:38serhiy.storchakasetrecipients: + serhiy.storchaka, benjamin.peterson
2016年12月17日 09:37:38serhiy.storchakasetmessageid: <1481967458.92.0.739722865425.issue28998@psf.upfronthosting.co.za>
2016年12月17日 09:37:38serhiy.storchakalinkissue28998 messages
2016年12月17日 09:37:38serhiy.storchakacreate

AltStyle によって変換されたページ (->オリジナル) /