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 ynikitenko
Recipients ynikitenko
Date 2019-11-14.17:31:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1573752702.13.0.205324703256.issue38801@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-11-14 17:31:42ynikitenkosetrecipients: + ynikitenko
2019-11-14 17:31:42ynikitenkosetmessageid: <1573752702.13.0.205324703256.issue38801@roundup.psfhosted.org>
2019-11-14 17:31:42ynikitenkolinkissue38801 messages
2019-11-14 17:31:41ynikitenkocreate