|
1 | 1 | from __future__ import annotations
|
2 | 2 |
|
| 3 | +import sys |
3 | 4 | from builtins import zip as standard_zip
|
4 | 5 | from collections import Counter as counter_dict
|
5 | 6 | from collections import deque
|
|
25 | 26 | from operator import gt as greater
|
26 | 27 | from operator import le as less_or_equal
|
27 | 28 | from operator import lt as less
|
28 |
| -from sys import version_info |
29 | 29 | from typing import (
|
30 | 30 | Any,
|
31 | 31 | ContextManager,
|
@@ -472,10 +472,7 @@ def accumulate_reduce(function: Binary[T, T, T], iterable: Iterable[T]) -> Itera
|
472 | 472 |
|
473 | 473 |
|
474 | 474 | def accumulate_fold(initial: U, function: Binary[U, T, U], iterable: Iterable[T]) -> Iterator[U]:
|
475 |
| - if version_info >= (3, 8, 0): |
476 |
| - return standard_accumulate(iterable, function, initial=initial) |
477 |
| - |
478 |
| - return standard_accumulate(prepend(initial, iterable), function) # type: ignore[arg-type] |
| 475 | + return standard_accumulate(iterable, function, initial=initial) |
479 | 476 |
|
480 | 477 |
|
481 | 478 | @overload
|
@@ -2389,7 +2386,7 @@ def zip_equal(
|
2389 | 2386 |
|
2390 | 2387 |
|
2391 | 2388 | def zip_equal(*iterables: Iterable[Any]) -> Iterator[DynamicTuple[Any]]:
|
2392 |
| - if version_info >= (3, 10, 0): |
| 2389 | + if sys.version_info >= (3, 10): |
2393 | 2390 | return standard_zip(*iterables, strict=True)
|
2394 | 2391 |
|
2395 | 2392 | return zip_equal_simple(*iterables)
|
|
0 commit comments