summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-27 13:09:36 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-27 13:09:36 (GMT)
commit994f04dbf576f4ebafb9de2bc6821e15cb0de0ea (patch)
tree4967ed9c9688f7fe035c646de993c337141051b0 /Lib/idlelib/PyShell.py
parent58c2c6ebb893917e759cc1401b0d862b3f7c1a94 (diff)
downloadcpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.zip
cpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.gz
cpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.bz2
Issue #28998: More APIs now support longs as well as ints.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rwxr-xr-xLib/idlelib/PyShell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 3ea1a7d..fdd7cb1 100755
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1370,7 +1370,7 @@ class PseudoInputFile(PseudoFile):
raise ValueError("read from closed file")
if size is None:
size = -1
- elif not isinstance(size, int):
+ elif not isinstance(size, (int, long)):
raise TypeError('must be int, not ' + type(size).__name__)
result = self._line_buffer
self._line_buffer = ''
@@ -1393,7 +1393,7 @@ class PseudoInputFile(PseudoFile):
raise ValueError("read from closed file")
if size is None:
size = -1
- elif not isinstance(size, int):
+ elif not isinstance(size, (int, long)):
raise TypeError('must be int, not ' + type(size).__name__)
line = self._line_buffer or self.shell.readline()
if size < 0: