Message356618
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. |
|
Date |
User |
Action |
Args |
2019-11-14 17:31:42 | ynikitenko | set | recipients:
+ ynikitenko |
2019-11-14 17:31:42 | ynikitenko | set | messageid: <1573752702.13.0.205324703256.issue38801@roundup.psfhosted.org> |
2019-11-14 17:31:42 | ynikitenko | link | issue38801 messages |
2019-11-14 17:31:41 | ynikitenko | create | |
|