pythonic-fp.iterables 5.1.2__tar.gz → 5.1.3__tar.gz
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-5.1.2 → pythonic_fp_iterables-5.1.3}/PKG-INFO +6 -6
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/README.rst +2 -2
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/pyproject.toml +3 -3
- pythonic_fp_iterables-5.1.3/src/pythonic_fp/iterables/__init__.py +45 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/drop_take.py +8 -5
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/folding.py +9 -1
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/merging.py +10 -2
- pythonic_fp_iterables-5.1.2/src/pythonic_fp/iterables/__init__.py +0 -42
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/.gitignore +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/CHANGELOG.rst +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/LICENSE +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/__init__.pyi +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/drop_take.pyi +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/folding.pyi +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/merging.pyi +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/py.typed +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/tests/test_fold.py +0 -0
- {pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/tests/test_iterable.py +0 -0
|
@@ -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,8 +14,8 @@ 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>=
|
|
17
|
+
Requires-Dist: pythonic-fp-fptools>=5.2.0
|
|
18
|
+
Requires-Dist: pythonic-fp-gadgets>=4.0.2
|
|
19
19
|
Requires-Dist: pytest>=8.4.1 ; extra == "test"
|
|
20
20
|
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-iterables/blob/main/CHANGELOG.rst
|
|
21
21
|
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/iterables/development/build/html/
|
|
@@ -44,7 +44,7 @@ Library of functions for iterating iterables.
|
|
|
44
44
|
|
|
45
45
|
Part of the
|
|
46
46
|
`pythonic-fp
|
|
47
|
-
<https://grscheller.github.io/pythonic-fp
|
|
47
|
+
<https://grscheller.github.io/pythonic-fp>`_
|
|
48
48
|
PyPI projects.
|
|
49
49
|
|
|
50
50
|
Documentation
|
|
@@ -52,7 +52,7 @@ Documentation
|
|
|
52
52
|
|
|
53
53
|
Documentation for this project is hosted on
|
|
54
54
|
`GitHub Pages
|
|
55
|
-
<https://grscheller.github.io/pythonic-fp/iterables
|
|
55
|
+
<https://grscheller.github.io/pythonic-fp/iterables>`_.
|
|
56
56
|
|
|
57
57
|
Copyright and License
|
|
58
58
|
---------------------
|
|
@@ -19,7 +19,7 @@ Library of functions for iterating iterables.
|
|
|
19
19
|
|
|
20
20
|
Part of the
|
|
21
21
|
`pythonic-fp
|
|
22
|
-
<https://grscheller.github.io/pythonic-fp
|
|
22
|
+
<https://grscheller.github.io/pythonic-fp>`_
|
|
23
23
|
PyPI projects.
|
|
24
24
|
|
|
25
25
|
Documentation
|
|
@@ -27,7 +27,7 @@ Documentation
|
|
|
27
27
|
|
|
28
28
|
Documentation for this project is hosted on
|
|
29
29
|
`GitHub Pages
|
|
30
|
-
<https://grscheller.github.io/pythonic-fp/iterables
|
|
30
|
+
<https://grscheller.github.io/pythonic-fp/iterables>`_.
|
|
31
31
|
|
|
32
32
|
Copyright and License
|
|
33
33
|
---------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pythonic-fp-iterables"
|
|
3
|
-
version = "5.1.
|
|
3
|
+
version = "5.1.3"
|
|
4
4
|
readme = "README.rst"
|
|
5
5
|
requires-python = ">=3.13"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -16,8 +16,8 @@ classifiers = [
|
|
|
16
16
|
"Typing :: Typed",
|
|
17
17
|
]
|
|
18
18
|
dependencies = [
|
|
19
|
-
"pythonic-fp-fptools>=5.
|
|
20
|
-
"pythonic-fp-gadgets>=
|
|
19
|
+
"pythonic-fp-fptools>=5.2.0",
|
|
20
|
+
"pythonic-fp-gadgets>=4.0.2",
|
|
21
21
|
]
|
|
22
22
|
dynamic = ["description"]
|
|
23
23
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Copyright 2023-2026 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
|
+
"""
|
|
16
|
+
Tools for iterables
|
|
17
|
+
-------------------
|
|
18
|
+
|
|
19
|
+
.. admonition:: Library of functions for iterating iterables
|
|
20
|
+
|
|
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
|
+
+-----------+-------------------------------------------+
|
|
30
|
+
|
|
31
|
+
.. important::
|
|
32
|
+
|
|
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``
|
|
40
|
+
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
__author__ = 'Geoffrey R. Scheller'
|
|
44
|
+
__copyright__ = 'Copyright (c) 2023-2026 Geoffrey R. Scheller'
|
|
45
|
+
__license__ = 'Apache License 2.0'
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/drop_take.py
RENAMED
|
@@ -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,9 +36,6 @@ __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
|
|
|
@@ -163,4 +166,4 @@ def take_while_split[D](
|
|
|
163
166
|
value: Box[D] = Box()
|
|
164
167
|
it_pred = _take_while(iterator, pred, value)
|
|
165
168
|
|
|
166
|
-
return
|
|
169
|
+
return it_pred, concat(value, iterator)
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/folding.py
RENAMED
|
@@ -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
|
+
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
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/merging.py
RENAMED
|
@@ -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
|
|
@@ -126,7 +134,7 @@ 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
139
|
:param iterables: Iterables to blend together.
|
|
132
140
|
:param merge_enum: ``MergeEnum`` to determine merging behavior.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# Copyright 2023-2024 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
|
-
"""
|
|
16
|
-
Library of functions for iterating iterables
|
|
17
|
-
============================================
|
|
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
|
-
+-----------+-------------------------------------------+
|
|
28
|
-
|
|
29
|
-
Assumptions
|
|
30
|
-
-----------
|
|
31
|
-
|
|
32
|
-
- iterables are not necessarily iterators
|
|
33
|
-
- at all times iterator protocol is assumed to be followed
|
|
34
|
-
|
|
35
|
-
- all iterators are assumed to be iterable
|
|
36
|
-
- for all iterators ``foobar`` we assume ``iter(foobar) is foobar``
|
|
37
|
-
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
__author__ = 'Geoffrey R. Scheller'
|
|
41
|
-
__copyright__ = 'Copyright (c) 2023-2025 Geoffrey R. Scheller'
|
|
42
|
-
__license__ = 'Apache License 2.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/__init__.pyi
RENAMED
|
File without changes
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/drop_take.pyi
RENAMED
|
File without changes
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/folding.pyi
RENAMED
|
File without changes
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/merging.pyi
RENAMED
|
File without changes
|
{pythonic_fp_iterables-5.1.2 → pythonic_fp_iterables-5.1.3}/src/pythonic_fp/iterables/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|