[issue38801] Scientific notation doesn't work with itertools.islice

Raymond Hettinger report at bugs.python.org
Thu Nov 14 13:00:24 EST 2019


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Hello Yaroslav.  What you've observed was a intentional change to make islice() behave more like regular slices.  Neither of those accept floats which are precarious to use for indexing.

A workaround is to replace 1e+6 with 10**6.

----------
nosy: +rhettinger
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38801>
_______________________________________


More information about the Python-bugs-list mailing list