[issue33040] Make itertools.islice supports negative values for start and stop arguments for sized iterable object

2021-04-28 Thread Yaroslav Nikitenko
Yaroslav Nikitenko added the comment: Sorry for a typo. The paragraph before the last should read Negative *step* fundamentally changes the algorithm:... flow[-1:None:-1]. -- ___ Python tracker <https://bugs.python.org/issue33

[issue33040] Make itertools.islice supports negative values for start and stop arguments for sized iterable object

2021-04-28 Thread Yaroslav Nikitenko
Yaroslav Nikitenko added the comment: I hope it's fine to add to closed topics here. I agree with the decision that islice should not handle a special case of sized containers vs iterables. However, I think that the support of negative indices in islice would be nice. A simple use

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

2019-11-14 Thread Yaroslav Nikitenko
Yaroslav Nikitenko added the comment: Hello Raymond. Many thanks for your explanation. In this case I suggest any of the following: 1) distinguish between integer and floating numbers in scientific notation. Definitely, 1e+6 is an integer. I can't see where else numbers in scien

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

2019-11-14 Thread Yaroslav Nikitenko
New submission from Yaroslav Nikitenko : 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) # 100.0 import itertools # islice without scientific notation