[New-bugs-announce] [issue38801] Scientific notation doesn't work with itertools.islice
Yaroslav Nikitenko
report at bugs.python.org
Thu Nov 14 12:31:42 EST 2019
New submission from Yaroslav Nikitenko <metst13 at gmail.com>:
Numbers written in scientific notation don't work with itertools.islice.
Check this script:
# a usual function works
## def works as well
f = lambda x : x
f(1e+6)
# 1000000.0
import itertools
# islice without scientific notation works
itertools.islice([], 1000000)
# <itertools.islice object at 0x7fc7ce55be90>
itertools.islice([], 1e+6)
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize.
All this works well in Python 2.7.17, but scientific notation fails in Python 3.7.5. I use Fedora Core 29.
----------
components: Library (Lib)
messages: 356618
nosy: ynikitenko
priority: normal
severity: normal
status: open
title: Scientific notation doesn't work with itertools.islice
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38801>
_______________________________________
More information about the New-bugs-announce
mailing list