pythonic-fp.iterables 5.1.1__py3-none-any.whl → 5.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pythonic_fp/iterables/__init__.py +22 -19
- pythonic_fp/iterables/__init__.pyi +0 -0
- pythonic_fp/iterables/drop_take.py +31 -27
- pythonic_fp/iterables/drop_take.pyi +2 -25
- pythonic_fp/iterables/folding.py +10 -2
- pythonic_fp/iterables/folding.pyi +8 -51
- pythonic_fp/iterables/merging.py +25 -17
- pythonic_fp/iterables/merging.pyi +6 -30
- {pythonic_fp_iterables-5.1.1.dist-info → pythonic_fp_iterables-5.1.3.dist-info}/METADATA +11 -10
- pythonic_fp_iterables-5.1.3.dist-info/RECORD +13 -0
- pythonic_fp_iterables-5.1.1.dist-info/RECORD +0 -12
- {pythonic_fp_iterables-5.1.1.dist-info → pythonic_fp_iterables-5.1.3.dist-info}/WHEEL +0 -0
- {pythonic_fp_iterables-5.1.1.dist-info → pythonic_fp_iterables-5.1.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2023-
|
|
1
|
+
# Copyright 2023-2026 Geoffrey R. Scheller
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -13,30 +13,33 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Tools for iterables
|
|
17
|
+
-------------------
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
| Module | Description |
|
|
21
|
-
+===========+===========================================+
|
|
22
|
-
| merging | Concatenating and merging iterables |
|
|
23
|
-
+-----------+-------------------------------------------+
|
|
24
|
-
| drop_take | Dropping and taking values from iterables |
|
|
25
|
-
+-----------+-------------------------------------------+
|
|
26
|
-
| folding | Reducing and accumulating iterables |
|
|
27
|
-
+-----------+-------------------------------------------+
|
|
19
|
+
.. admonition:: Library of functions for iterating iterables
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
+-----------+-------------------------------------------+
|
|
22
|
+
| Module | Description |
|
|
23
|
+
+===========+===========================================+
|
|
24
|
+
| merging | Concatenating and merging iterables |
|
|
25
|
+
+-----------+-------------------------------------------+
|
|
26
|
+
| drop_take | Dropping and taking values from iterables |
|
|
27
|
+
+-----------+-------------------------------------------+
|
|
28
|
+
| folding | Reducing and accumulating iterables |
|
|
29
|
+
+-----------+-------------------------------------------+
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
- at all times iterator protocol is assumed to be followed
|
|
31
|
+
.. important::
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
**Assumptions:**
|
|
34
|
+
|
|
35
|
+
- iterables are not necessarily iterators
|
|
36
|
+
- at all times iterator protocol is assumed to be followed
|
|
37
|
+
|
|
38
|
+
- all iterators are assumed to be iterable
|
|
39
|
+
- for all iterators ``foobar`` we assume ``iter(foobar) is foobar``
|
|
37
40
|
|
|
38
41
|
"""
|
|
39
42
|
|
|
40
43
|
__author__ = 'Geoffrey R. Scheller'
|
|
41
|
-
__copyright__ = 'Copyright (c) 2023-
|
|
44
|
+
__copyright__ = 'Copyright (c) 2023-2026 Geoffrey R. Scheller'
|
|
42
45
|
__license__ = 'Apache License 2.0'
|
|
File without changes
|
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
|
|
16
|
+
Drop and Take
|
|
17
|
+
-------------
|
|
18
|
+
|
|
19
|
+
.. admonition:: module pythonic_fp.iterables.drop_take
|
|
20
|
+
|
|
21
|
+
Functions to drop or take values from an iterable.
|
|
22
|
+
|
|
17
23
|
"""
|
|
18
24
|
|
|
19
25
|
from collections.abc import Callable, Iterable, Iterator
|
|
@@ -30,15 +36,12 @@ __all__ = [
|
|
|
30
36
|
]
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
## dropping and taking
|
|
34
|
-
|
|
35
|
-
|
|
36
39
|
def drop[D](iterable: Iterable[D], n: int) -> Iterator[D]:
|
|
37
40
|
"""Drop the next n values from iterable.
|
|
38
41
|
|
|
39
|
-
:param iterable:
|
|
40
|
-
:param n:
|
|
41
|
-
:returns:
|
|
42
|
+
:param iterable: Iterable whose values are to be dropped.
|
|
43
|
+
:param n: Number of values to be dropped.
|
|
44
|
+
:returns: An iterator of the remaining values.
|
|
42
45
|
|
|
43
46
|
"""
|
|
44
47
|
iterator = iter(iterable)
|
|
@@ -53,9 +56,9 @@ def drop[D](iterable: Iterable[D], n: int) -> Iterator[D]:
|
|
|
53
56
|
def drop_while[D](iterable: Iterable[D], pred: Callable[[D], bool]) -> Iterator[D]:
|
|
54
57
|
"""Drop initial values from iterable while predicate is true.
|
|
55
58
|
|
|
56
|
-
:param iterable:
|
|
57
|
-
:param pred: Boolean valued function, the "predicate"
|
|
58
|
-
:
|
|
59
|
+
:param iterable: Iterable whose values are to be dropped.
|
|
60
|
+
:param pred: Single argument Boolean valued function, the "predicate".
|
|
61
|
+
:returns: An iterator beginning where pred returned false.
|
|
59
62
|
|
|
60
63
|
"""
|
|
61
64
|
iterator = iter(iterable)
|
|
@@ -73,9 +76,9 @@ def drop_while[D](iterable: Iterable[D], pred: Callable[[D], bool]) -> Iterator[
|
|
|
73
76
|
def take[D](iterable: Iterable[D], n: int) -> Iterator[D]:
|
|
74
77
|
"""Return an iterator of up to n initial values of an iterable.
|
|
75
78
|
|
|
76
|
-
:param
|
|
77
|
-
:param n:
|
|
78
|
-
:
|
|
79
|
+
:param Iterable: iterable providing the values to be taken.
|
|
80
|
+
:param n: Number of values to be dropped.
|
|
81
|
+
:returns: An iterator of up to n initial values from iterable.
|
|
79
82
|
|
|
80
83
|
"""
|
|
81
84
|
iterator = iter(iterable)
|
|
@@ -91,11 +94,12 @@ def take_while[D](iterable: Iterable[D], pred: Callable[[D], bool]) -> Iterator[
|
|
|
91
94
|
"""Yield values from iterable while predicate is true.
|
|
92
95
|
|
|
93
96
|
.. warning::
|
|
97
|
+
|
|
94
98
|
Risk of value loss if iterable is multiple referenced iterator.
|
|
95
99
|
|
|
96
|
-
:param iterable:
|
|
97
|
-
:param pred: Boolean valued function, the "predicate"
|
|
98
|
-
:
|
|
100
|
+
:param iterable: Iterable providing the values to be taken.
|
|
101
|
+
:param pred: Single argument Boolean valued function, the "predicate".
|
|
102
|
+
:returns: An Iterator of of values from iterable until predicate false.
|
|
99
103
|
|
|
100
104
|
"""
|
|
101
105
|
iterator = iter(iterable)
|
|
@@ -115,12 +119,12 @@ def take_split[D](iterable: Iterable[D], n: int) -> tuple[Iterator[D], Iterator[
|
|
|
115
119
|
|
|
116
120
|
.. Warning::
|
|
117
121
|
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
**CONTRACT:** Do not access the second returned iterator until the
|
|
123
|
+
first one is exhausted.
|
|
120
124
|
|
|
121
|
-
:param iterable:
|
|
122
|
-
:param n: maximum
|
|
123
|
-
:
|
|
125
|
+
:param iterable: Iterable providing the values to be taken.
|
|
126
|
+
:param n: maximum Number of values to be taken.
|
|
127
|
+
:returns: An iterator of values taken and an iterator of remaining values.
|
|
124
128
|
|
|
125
129
|
"""
|
|
126
130
|
iterator = iter(iterable)
|
|
@@ -136,12 +140,12 @@ def take_while_split[D](
|
|
|
136
140
|
|
|
137
141
|
.. Warning::
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
**CONTRACT:** Do not access the second returned iterator until
|
|
144
|
+
the first one is exhausted.
|
|
141
145
|
|
|
142
|
-
:param iterable:
|
|
143
|
-
:param pred: Boolean valued function
|
|
144
|
-
:
|
|
146
|
+
:param iterable: Iterable providing the values to be taken.
|
|
147
|
+
:param pred: Single argument Boolean valued function.
|
|
148
|
+
:returns: Tuple of iterator of values taken and an iterator of remaining values.
|
|
145
149
|
|
|
146
150
|
"""
|
|
147
151
|
|
|
@@ -162,4 +166,4 @@ def take_while_split[D](
|
|
|
162
166
|
value: Box[D] = Box()
|
|
163
167
|
it_pred = _take_while(iterator, pred, value)
|
|
164
168
|
|
|
165
|
-
return
|
|
169
|
+
return it_pred, concat(value, iterator)
|
|
@@ -1,33 +1,10 @@
|
|
|
1
|
-
# Copyright 2023-2025 Geoffrey R. Scheller
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
1
|
from collections.abc import Callable, Iterable, Iterator
|
|
16
2
|
|
|
17
|
-
__all__ = [
|
|
18
|
-
'drop',
|
|
19
|
-
'drop_while',
|
|
20
|
-
'take',
|
|
21
|
-
'take_while',
|
|
22
|
-
'take_split',
|
|
23
|
-
'take_while_split',
|
|
24
|
-
]
|
|
3
|
+
__all__ = ['drop', 'drop_while', 'take', 'take_while', 'take_split', 'take_while_split']
|
|
25
4
|
|
|
26
5
|
def drop[D](iterable: Iterable[D], n: int) -> Iterator[D]: ...
|
|
27
6
|
def drop_while[D](iterable: Iterable[D], pred: Callable[[D], bool]) -> Iterator[D]: ...
|
|
28
7
|
def take[D](iterable: Iterable[D], n: int) -> Iterator[D]: ...
|
|
29
8
|
def take_while[D](iterable: Iterable[D], pred: Callable[[D], bool]) -> Iterator[D]: ...
|
|
30
9
|
def take_split[D](iterable: Iterable[D], n: int) -> tuple[Iterator[D], Iterator[D]]: ...
|
|
31
|
-
def take_while_split[D](
|
|
32
|
-
iterable: Iterable[D], pred: Callable[[D], bool]
|
|
33
|
-
) -> tuple[Iterator[D], Iterator[D]]: ...
|
|
10
|
+
def take_while_split[D](iterable: Iterable[D], pred: Callable[[D], bool]) -> tuple[Iterator[D], Iterator[D]]: ...
|
pythonic_fp/iterables/folding.py
CHANGED
|
@@ -12,13 +12,21 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
"""
|
|
15
|
+
"""
|
|
16
|
+
Folding
|
|
17
|
+
-------
|
|
18
|
+
|
|
19
|
+
.. admonition:: module pythonic_fp.iterables.folding
|
|
20
|
+
|
|
21
|
+
Functions to reduce and accumulate values from iterables.
|
|
22
|
+
|
|
23
|
+
"""
|
|
16
24
|
|
|
17
25
|
from collections.abc import Callable, Iterable, Iterator
|
|
18
26
|
from typing import cast, Never
|
|
19
27
|
from pythonic_fp.fptools.function import negate, swap
|
|
20
28
|
from pythonic_fp.fptools.maybe import MayBe
|
|
21
|
-
from pythonic_fp.sentinels.novalue import NoValue
|
|
29
|
+
from pythonic_fp.gadgets.sentinels.novalue import NoValue
|
|
22
30
|
from .drop_take import drop_while, take_while_split
|
|
23
31
|
|
|
24
32
|
__all__ = [
|
|
@@ -1,56 +1,13 @@
|
|
|
1
|
-
# Copyright 2023-2025 Geoffrey R. Scheller
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
1
|
from collections.abc import Callable, Iterable, Iterator
|
|
16
|
-
from typing import cast, Never
|
|
17
|
-
from pythonic_fp.fptools.function import negate, swap
|
|
18
2
|
from pythonic_fp.fptools.maybe import MayBe
|
|
19
|
-
from pythonic_fp.sentinels.novalue import NoValue
|
|
20
|
-
from
|
|
3
|
+
from pythonic_fp.gadgets.sentinels.novalue import NoValue
|
|
4
|
+
from typing import Never
|
|
21
5
|
|
|
22
|
-
__all__ = [
|
|
23
|
-
'accumulate',
|
|
24
|
-
'reduce_left',
|
|
25
|
-
'fold_left',
|
|
26
|
-
'maybe_fold_left',
|
|
27
|
-
'sc_reduce_left',
|
|
28
|
-
'sc_reduce_right',
|
|
29
|
-
]
|
|
6
|
+
__all__ = ['accumulate', 'reduce_left', 'fold_left', 'maybe_fold_left', 'sc_reduce_left', 'sc_reduce_right']
|
|
30
7
|
|
|
31
|
-
def accumulate[D, L](
|
|
32
|
-
iterable: Iterable[D], f: Callable[[L, D], L], initial: L | NoValue = NoValue()
|
|
33
|
-
) -> Iterator[L]: ...
|
|
8
|
+
def accumulate[D, L](iterable: Iterable[D], f: Callable[[L, D], L], initial: L | NoValue = ...) -> Iterator[L]: ...
|
|
34
9
|
def reduce_left[D](iterable: Iterable[D], f: Callable[[D, D], D]) -> D | Never: ...
|
|
35
|
-
def fold_left[D, L](
|
|
36
|
-
|
|
37
|
-
) ->
|
|
38
|
-
def
|
|
39
|
-
iterable: Iterable[D], f: Callable[[L, D], L], initial: L | NoValue = NoValue()
|
|
40
|
-
) -> MayBe[L] | Never: ...
|
|
41
|
-
def sc_reduce_left[D](
|
|
42
|
-
iterable: Iterable[D],
|
|
43
|
-
f: Callable[[D, D], D],
|
|
44
|
-
start: Callable[[D], bool] = (lambda d: True),
|
|
45
|
-
stop: Callable[[D], bool] = (lambda d: False),
|
|
46
|
-
include_start: bool = True,
|
|
47
|
-
include_stop: bool = True,
|
|
48
|
-
) -> tuple[MayBe[D], Iterator[D]]: ...
|
|
49
|
-
def sc_reduce_right[D](
|
|
50
|
-
iterable: Iterable[D],
|
|
51
|
-
f: Callable[[D, D], D],
|
|
52
|
-
start: Callable[[D], bool] = (lambda d: False),
|
|
53
|
-
stop: Callable[[D], bool] = (lambda d: False),
|
|
54
|
-
include_start: bool = True,
|
|
55
|
-
include_stop: bool = True,
|
|
56
|
-
) -> tuple[MayBe[D], Iterator[D]]: ...
|
|
10
|
+
def fold_left[D, L](iterable: Iterable[D], f: Callable[[L, D], L], initial: L) -> L | Never: ...
|
|
11
|
+
def maybe_fold_left[D, L](iterable: Iterable[D], f: Callable[[L, D], L], initial: L | NoValue = ...) -> MayBe[L] | Never: ...
|
|
12
|
+
def sc_reduce_left[D](iterable: Iterable[D], f: Callable[[D, D], D], start: Callable[[D], bool] = ..., stop: Callable[[D], bool] = ..., include_start: bool = True, include_stop: bool = True) -> tuple[MayBe[D], Iterator[D]]: ...
|
|
13
|
+
def sc_reduce_right[D](iterable: Iterable[D], f: Callable[[D, D], D], start: Callable[[D], bool] = ..., stop: Callable[[D], bool] = ..., include_start: bool = True, include_stop: bool = True) -> tuple[MayBe[D], Iterator[D]]: ...
|
pythonic_fp/iterables/merging.py
CHANGED
|
@@ -12,7 +12,15 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
"""
|
|
15
|
+
"""
|
|
16
|
+
Merging Iterables
|
|
17
|
+
-----------------
|
|
18
|
+
|
|
19
|
+
.. admonition:: module pythonic_fp.iterables.merging
|
|
20
|
+
|
|
21
|
+
Functions to merge multiple iterables together into one.
|
|
22
|
+
|
|
23
|
+
"""
|
|
16
24
|
|
|
17
25
|
from collections.abc import Iterable, Iterator
|
|
18
26
|
from enum import auto, Enum
|
|
@@ -51,8 +59,8 @@ def concat[D](*iterables: Iterable[D]) -> Iterator[D]:
|
|
|
51
59
|
|
|
52
60
|
Performant to the standard library's ``itertools.chain``.
|
|
53
61
|
|
|
54
|
-
:param iterables:
|
|
55
|
-
:
|
|
62
|
+
:param iterables: Iterables to concatenate.
|
|
63
|
+
:returns: Iterator of concatenated values from the iterables.
|
|
56
64
|
|
|
57
65
|
"""
|
|
58
66
|
for iterator in map(lambda x: iter(x), iterables):
|
|
@@ -69,13 +77,13 @@ def merge[D](*iterables: Iterable[D], yield_partials: bool = False) -> Iterator[
|
|
|
69
77
|
|
|
70
78
|
.. note::
|
|
71
79
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
80
|
+
When ``yield_partials`` is true, then any unmatched values from other iterables
|
|
81
|
+
already yielded when the first iterable is exhausted are yielded. This prevents
|
|
82
|
+
data lose if any of the iterables are iterators with external references.
|
|
75
83
|
|
|
76
|
-
:param iterables:
|
|
77
|
-
:param yield_partials:
|
|
78
|
-
:
|
|
84
|
+
:param iterables: Iterables to merge until one gets exhausted.
|
|
85
|
+
:param yield_partials: Yield any unpaired yielded values from other iterables.
|
|
86
|
+
:returns: Iterator of merged values from the iterables until one is exhausted.
|
|
79
87
|
|
|
80
88
|
"""
|
|
81
89
|
iter_list = list(map(lambda x: iter(x), iterables))
|
|
@@ -96,8 +104,8 @@ def merge[D](*iterables: Iterable[D], yield_partials: bool = False) -> Iterator[
|
|
|
96
104
|
def exhaust[D](*iterables: Iterable[D]) -> Iterator[D]:
|
|
97
105
|
"""Merge together multiple iterables until all are exhausted.
|
|
98
106
|
|
|
99
|
-
:param iterables:
|
|
100
|
-
:
|
|
107
|
+
:param iterables: Iterables to exhaustively merge.
|
|
108
|
+
:returns: Iterator of merged values from the iterables until all are exhausted.
|
|
101
109
|
|
|
102
110
|
"""
|
|
103
111
|
iter_list = list(map(lambda x: iter(x), iterables))
|
|
@@ -126,13 +134,13 @@ def blend[D](
|
|
|
126
134
|
merge_enum: MergeEnum = MergeEnum.Concat,
|
|
127
135
|
yield_partials: bool = False,
|
|
128
136
|
) -> Iterator[D]:
|
|
129
|
-
"""
|
|
137
|
+
"""Merge behavior based on value of merge_enum parameter.
|
|
130
138
|
|
|
131
|
-
:param iterables:
|
|
132
|
-
:param merge_enum: MergeEnum to determine merging behavior
|
|
133
|
-
:param yield_partials:
|
|
134
|
-
:
|
|
135
|
-
:raises ValueError:
|
|
139
|
+
:param iterables: Iterables to blend together.
|
|
140
|
+
:param merge_enum: ``MergeEnum`` to determine merging behavior.
|
|
141
|
+
:param yield_partials: Yield unpaired values from other iterables.
|
|
142
|
+
:returns: An iterator of type ``D``.
|
|
143
|
+
:raises ValueError: When an unknown ``MergeEnum`` is given.
|
|
136
144
|
|
|
137
145
|
"""
|
|
138
146
|
match merge_enum:
|
|
@@ -1,38 +1,14 @@
|
|
|
1
|
-
# Copyright 2023-2025 Geoffrey R. Scheller
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
1
|
from collections.abc import Iterable, Iterator
|
|
16
|
-
from enum import
|
|
2
|
+
from enum import Enum
|
|
17
3
|
|
|
18
|
-
__all__ = [
|
|
19
|
-
'MergeEnum',
|
|
20
|
-
'concat',
|
|
21
|
-
'merge',
|
|
22
|
-
'exhaust',
|
|
23
|
-
'blend',
|
|
24
|
-
]
|
|
4
|
+
__all__ = ['MergeEnum', 'concat', 'merge', 'exhaust', 'blend']
|
|
25
5
|
|
|
26
6
|
class MergeEnum(Enum):
|
|
27
|
-
Concat =
|
|
28
|
-
Merge =
|
|
29
|
-
Exhaust =
|
|
7
|
+
Concat = ...
|
|
8
|
+
Merge = ...
|
|
9
|
+
Exhaust = ...
|
|
30
10
|
|
|
31
11
|
def concat[D](*iterables: Iterable[D]) -> Iterator[D]: ...
|
|
32
12
|
def merge[D](*iterables: Iterable[D], yield_partials: bool = False) -> Iterator[D]: ...
|
|
33
13
|
def exhaust[D](*iterables: Iterable[D]) -> Iterator[D]: ...
|
|
34
|
-
def blend[D](
|
|
35
|
-
*iterables: Iterable[D],
|
|
36
|
-
merge_enum: MergeEnum = MergeEnum.Concat,
|
|
37
|
-
yield_partials: bool = False,
|
|
38
|
-
) -> Iterator[D]: ...
|
|
14
|
+
def blend[D](*iterables: Iterable[D], merge_enum: MergeEnum = ..., yield_partials: bool = False) -> Iterator[D]: ...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonic-fp-iterables
|
|
3
|
-
Version: 5.1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 5.1.3
|
|
4
|
+
Summary: Tools for iterables
|
|
5
5
|
Keywords: iterables,iterators
|
|
6
6
|
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
7
|
Requires-Python: >=3.13
|
|
@@ -14,13 +14,12 @@ Classifier: Operating System :: OS Independent
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Classifier: Typing :: Typed
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: pythonic-fp-fptools>=5.
|
|
18
|
-
Requires-Dist: pythonic-fp-gadgets>=
|
|
19
|
-
Requires-Dist: pythonic-fp-sentinels>=2.1.0
|
|
17
|
+
Requires-Dist: pythonic-fp-fptools>=5.2.0
|
|
18
|
+
Requires-Dist: pythonic-fp-gadgets>=4.0.2
|
|
20
19
|
Requires-Dist: pytest>=8.4.1 ; extra == "test"
|
|
21
20
|
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-iterables/blob/main/CHANGELOG.rst
|
|
22
|
-
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/iterables/development/build/html/
|
|
23
|
-
Project-URL: Homepage, https://github.
|
|
21
|
+
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/iterables/development/build/html/
|
|
22
|
+
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/homepage/build/html/
|
|
24
23
|
Project-URL: Source, https://github.com/grscheller/pythonic-fp-iterables
|
|
25
24
|
Provides-Extra: test
|
|
26
25
|
|
|
@@ -43,15 +42,17 @@ Library of functions for iterating iterables.
|
|
|
43
42
|
- all iterators are assumed to be iterable
|
|
44
43
|
- for all iterators ``foo`` we assume ``iter(foo) is foo``
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
`pythonic-fp
|
|
45
|
+
Part of the
|
|
46
|
+
`pythonic-fp
|
|
47
|
+
<https://grscheller.github.io/pythonic-fp>`_
|
|
48
|
+
PyPI projects.
|
|
48
49
|
|
|
49
50
|
Documentation
|
|
50
51
|
-------------
|
|
51
52
|
|
|
52
53
|
Documentation for this project is hosted on
|
|
53
54
|
`GitHub Pages
|
|
54
|
-
<https://grscheller.github.io/pythonic-fp/iterables
|
|
55
|
+
<https://grscheller.github.io/pythonic-fp/iterables>`_.
|
|
55
56
|
|
|
56
57
|
Copyright and License
|
|
57
58
|
---------------------
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
pythonic_fp/iterables/__init__.py,sha256=oAoufgaFeHBH81d-ey738bBsVSximbrp0Rseb3EafnI,1663
|
|
2
|
+
pythonic_fp/iterables/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
pythonic_fp/iterables/drop_take.py,sha256=Kvj-B_xXD9t4tsIjMRdMXwSDKAeUsfbtLPs6X7wRapg,4847
|
|
4
|
+
pythonic_fp/iterables/drop_take.pyi,sha256=vPyByY4PxCGEuL6trI0aTK8fBr4xCuOgqhaKALwJ5Ys,653
|
|
5
|
+
pythonic_fp/iterables/folding.py,sha256=5-EJT-lp8EhAghMlNghla3rnVL0ywRS3-kGuO13oEVI,8711
|
|
6
|
+
pythonic_fp/iterables/folding.pyi,sha256=ZVrpB-D4kWoVwpCsQ2rc3GJ8iTzavAOQ5YK9LteAukU,1175
|
|
7
|
+
pythonic_fp/iterables/merging.py,sha256=mJ4nmIxSwuoi8LvYTHbU-JEUqkii1BdociRs59Dxq-A,4613
|
|
8
|
+
pythonic_fp/iterables/merging.pyi,sha256=KnuSFREXEpnbtTvMWsvn-KfeSjZ3ybP-6n9hCxjNKVs,533
|
|
9
|
+
pythonic_fp/iterables/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
pythonic_fp_iterables-5.1.3.dist-info/licenses/LICENSE,sha256=IJMkVWQUVy-SonK6SMaMotDQ6Zb-lVi2bUTiGp1GUO8,10774
|
|
11
|
+
pythonic_fp_iterables-5.1.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
12
|
+
pythonic_fp_iterables-5.1.3.dist-info/METADATA,sha256=Mi8wDsA-nnmMXWfrhS42W1CULGDYOcsSRqTk1nxNJNo,2064
|
|
13
|
+
pythonic_fp_iterables-5.1.3.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
pythonic_fp/iterables/__init__.py,sha256=UTde8stsDVG_5Z7fo37yiYeTu8fhkkv0QsQcQb_ixTU,1590
|
|
2
|
-
pythonic_fp/iterables/drop_take.py,sha256=bHxVTJAY9vof570cFQNXNZZAUAtnWBDZgRu7df2aV9E,4707
|
|
3
|
-
pythonic_fp/iterables/drop_take.pyi,sha256=6BtavkUHIxMJmJfcvDAnds9R29OXrCRkDK12jG575VY,1276
|
|
4
|
-
pythonic_fp/iterables/folding.py,sha256=A4VoU7piryt6Fun6Inn1SJSr1IiN-aTqzeSs-mds5oQ,8604
|
|
5
|
-
pythonic_fp/iterables/folding.pyi,sha256=BUslV-cn9eOxlYAF_3wz09TcHDbMATUL0uqU7IjJyAM,2035
|
|
6
|
-
pythonic_fp/iterables/merging.py,sha256=tPVjw5Fr32gMTd4Uq3SKQPqdV9p5fs3xW-0elt8Yz8U,4462
|
|
7
|
-
pythonic_fp/iterables/merging.pyi,sha256=5QBH0NEoqWQwCvWMPBFVoUOWAwmMYqj2W4s2b1rn9J0,1189
|
|
8
|
-
pythonic_fp/iterables/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
pythonic_fp_iterables-5.1.1.dist-info/licenses/LICENSE,sha256=IJMkVWQUVy-SonK6SMaMotDQ6Zb-lVi2bUTiGp1GUO8,10774
|
|
10
|
-
pythonic_fp_iterables-5.1.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
11
|
-
pythonic_fp_iterables-5.1.1.dist-info/METADATA,sha256=v-ZcT1UdI4culcyrlTa2jZTw_ulXRaEhs30CSkAE0Ow,2218
|
|
12
|
-
pythonic_fp_iterables-5.1.1.dist-info/RECORD,,
|
|
File without changes
|
{pythonic_fp_iterables-5.1.1.dist-info → pythonic_fp_iterables-5.1.3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|