New submission from Serhiy Storchaka:

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)).

----------
components: Extension Modules, Library (Lib)
messages: 283479
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Unifying Long Integers and Integers in 2.7
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to