pythonic-fp.queues 5.1.3__py3-none-any.whl → 6.0.0__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/queues/de.py +3 -2
- pythonic_fp/queues/fifo.py +3 -2
- pythonic_fp/queues/lifo.py +3 -2
- pythonic_fp_queues-6.0.0.dist-info/METADATA +50 -0
- pythonic_fp_queues-6.0.0.dist-info/RECORD +9 -0
- pythonic_fp/queues/__init__.pyi +0 -0
- pythonic_fp/queues/de.pyi +0 -31
- pythonic_fp/queues/fifo.pyi +0 -24
- pythonic_fp/queues/lifo.pyi +0 -23
- pythonic_fp_queues-5.1.3.dist-info/METADATA +0 -65
- pythonic_fp_queues-5.1.3.dist-info/RECORD +0 -13
- {pythonic_fp_queues-5.1.3.dist-info → pythonic_fp_queues-6.0.0.dist-info}/WHEEL +0 -0
- {pythonic_fp_queues-5.1.3.dist-info → pythonic_fp_queues-6.0.0.dist-info}/licenses/LICENSE +0 -0
pythonic_fp/queues/de.py
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from collections.abc import Callable, Iterable, Iterator
|
|
16
16
|
from typing import cast, overload
|
|
17
|
+
|
|
17
18
|
from pythonic_fp.circulararray.auto import CA
|
|
18
19
|
from pythonic_fp.fptools.maybe import MayBe
|
|
19
20
|
|
|
@@ -138,7 +139,7 @@ class DEQueue[D]:
|
|
|
138
139
|
"""
|
|
139
140
|
return '>< ' + ' | '.join(map(str, self)) + ' ><'
|
|
140
141
|
|
|
141
|
-
def copy(self) ->
|
|
142
|
+
def copy(self) -> DEQueue[D]:
|
|
142
143
|
"""
|
|
143
144
|
.. admonition:: Copy
|
|
144
145
|
|
|
@@ -273,7 +274,7 @@ class DEQueue[D]:
|
|
|
273
274
|
return MayBe(cast(R, self._ca.foldr(cast(Callable[[D, D], D], f)))) # R = D
|
|
274
275
|
return MayBe(self._ca.foldr(f, start))
|
|
275
276
|
|
|
276
|
-
def map[U](self, f: Callable[[D], U]) ->
|
|
277
|
+
def map[U](self, f: Callable[[D], U]) -> DEQueue[U]:
|
|
277
278
|
"""
|
|
278
279
|
.. admonition:: Map
|
|
279
280
|
|
pythonic_fp/queues/fifo.py
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from collections.abc import Callable, Iterable, Iterator
|
|
16
16
|
from typing import cast, overload
|
|
17
|
+
|
|
17
18
|
from pythonic_fp.circulararray.auto import CA
|
|
18
19
|
from pythonic_fp.fptools.maybe import MayBe
|
|
19
20
|
|
|
@@ -126,7 +127,7 @@ class FIFOQueue[D]:
|
|
|
126
127
|
"""
|
|
127
128
|
return '<< ' + ' < '.join(map(str, self)) + ' <<'
|
|
128
129
|
|
|
129
|
-
def copy(self) ->
|
|
130
|
+
def copy(self) -> FIFOQueue[D]:
|
|
130
131
|
"""
|
|
131
132
|
.. admonition:: Copy
|
|
132
133
|
|
|
@@ -213,7 +214,7 @@ class FIFOQueue[D]:
|
|
|
213
214
|
return MayBe(cast(T, self._ca.foldl(cast(Callable[[D, D], D], f)))) # T = D
|
|
214
215
|
return MayBe(self._ca.foldl(f, start))
|
|
215
216
|
|
|
216
|
-
def map[U](self, f: Callable[[D], U]) ->
|
|
217
|
+
def map[U](self, f: Callable[[D], U]) -> FIFOQueue[U]:
|
|
217
218
|
"""
|
|
218
219
|
.. admonition:: Map
|
|
219
220
|
|
pythonic_fp/queues/lifo.py
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from collections.abc import Callable, Iterable, Iterator
|
|
16
16
|
from typing import cast, overload
|
|
17
|
+
|
|
17
18
|
from pythonic_fp.circulararray.auto import CA
|
|
18
19
|
from pythonic_fp.fptools.function import swap
|
|
19
20
|
from pythonic_fp.fptools.maybe import MayBe
|
|
@@ -126,7 +127,7 @@ class LIFOQueue[D]:
|
|
|
126
127
|
"""
|
|
127
128
|
return '|| ' + ' > '.join(map(str, self)) + ' ><'
|
|
128
129
|
|
|
129
|
-
def copy(self) ->
|
|
130
|
+
def copy(self) -> LIFOQueue[D]:
|
|
130
131
|
"""
|
|
131
132
|
.. admonition:: Copy
|
|
132
133
|
|
|
@@ -198,7 +199,7 @@ class LIFOQueue[D]:
|
|
|
198
199
|
return MayBe(cast(T, self._ca.foldl(cast(Callable[[D, D], D], f)))) # T = D
|
|
199
200
|
return MayBe(self._ca.foldr(swap(f), start))
|
|
200
201
|
|
|
201
|
-
def map[U](self, f: Callable[[D], U]) ->
|
|
202
|
+
def map[U](self, f: Callable[[D], U]) -> LIFOQueue[U]:
|
|
202
203
|
"""
|
|
203
204
|
.. admonition:: Map
|
|
204
205
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pythonic-fp-queues
|
|
3
|
+
Version: 6.0.0
|
|
4
|
+
Summary: Queues useful for different algorithmic use cases.
|
|
5
|
+
Keywords: queue,fifo,lifo,dqueue
|
|
6
|
+
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
|
+
Requires-Python: >=3.14
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Framework :: Pytest
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: pythonic-fp-circulararray>=6.4,<7
|
|
19
|
+
Requires-Dist: pythonic-fp-fptools>=6.2,<7
|
|
20
|
+
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-queues/blob/main/CHANGELOG.md
|
|
21
|
+
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp-queues
|
|
22
|
+
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp
|
|
23
|
+
Project-URL: Source, https://github.com/grscheller/pythonic-fp-queues
|
|
24
|
+
|
|
25
|
+
# Pythonic FP - Queues
|
|
26
|
+
|
|
27
|
+
Queue-like datastructures.
|
|
28
|
+
|
|
29
|
+
PyPI project
|
|
30
|
+
[pythonic-fp-queues](https://pypi.org/project/pythonic-fp-queues).
|
|
31
|
+
Part of the
|
|
32
|
+
[pythonic-fp](https://grscheller.github.io/pythonic-fp)
|
|
33
|
+
PyPI projects.
|
|
34
|
+
|
|
35
|
+
## Documentation
|
|
36
|
+
|
|
37
|
+
Documentation and other links for this project are hosted on
|
|
38
|
+
[GitHub Pages](https://grscheller.github.io/pythonic-fp-queues).
|
|
39
|
+
|
|
40
|
+
| module | class | name |
|
|
41
|
+
|:------ |:-----:|:---- |
|
|
42
|
+
| pythonic_fp.queues.fifo | FIFOQueue | First-In-First-Out Queue |
|
|
43
|
+
| pythonic_fp.queues.lifo | LIFOQueue | Last-In-First-Out Queue |
|
|
44
|
+
| pythonic_fp.queues.de | DEQueue | Double-Ended Queue |
|
|
45
|
+
|
|
46
|
+
## Copyright and License
|
|
47
|
+
|
|
48
|
+
Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
49
|
+
License, Version 2.0. See the LICENSE file for details.
|
|
50
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
pythonic_fp/queues/__init__.py,sha256=NOkkXOQaHmiemvY4Ke5ZdFJCl3_P3bmV87Xz5Y-R9cU,1028
|
|
2
|
+
pythonic_fp/queues/de.py,sha256=vSxWcsTB4w3CnZ2ciqT0oMaYGMm1s8i5thADbRzOkAg,8529
|
|
3
|
+
pythonic_fp/queues/fifo.py,sha256=R29zOr8h4d4v6yONvJG2wAq19K85Ydem6TS9pH6S5Cg,6800
|
|
4
|
+
pythonic_fp/queues/lifo.py,sha256=_WFGLh3OYtm2BI7ndQp9wfEjIq3LoxoC0rth7SnnPKE,6468
|
|
5
|
+
pythonic_fp/queues/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
pythonic_fp_queues-6.0.0.dist-info/licenses/LICENSE,sha256=IJMkVWQUVy-SonK6SMaMotDQ6Zb-lVi2bUTiGp1GUO8,10774
|
|
7
|
+
pythonic_fp_queues-6.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
8
|
+
pythonic_fp_queues-6.0.0.dist-info/METADATA,sha256=GcWgs7qUbudNtnIiukYkDCurXcpF2gh7yB3jFWICYkU,1819
|
|
9
|
+
pythonic_fp_queues-6.0.0.dist-info/RECORD,,
|
pythonic_fp/queues/__init__.pyi
DELETED
|
File without changes
|
pythonic_fp/queues/de.pyi
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
from collections.abc import Callable, Iterable, Iterator
|
|
2
|
-
from pythonic_fp.fptools.maybe import MayBe
|
|
3
|
-
from typing import overload
|
|
4
|
-
|
|
5
|
-
__all__ = ['DEQueue', 'de_queue']
|
|
6
|
-
|
|
7
|
-
class DEQueue[D]:
|
|
8
|
-
def __init__(self, *dss: Iterable[D]) -> None: ...
|
|
9
|
-
def __bool__(self) -> bool: ...
|
|
10
|
-
def __len__(self) -> int: ...
|
|
11
|
-
def __eq__(self, other: object) -> bool: ...
|
|
12
|
-
def __iter__(self) -> Iterator[D]: ...
|
|
13
|
-
def __reversed__(self) -> Iterator[D]: ...
|
|
14
|
-
def copy(self) -> DEQueue[D]: ...
|
|
15
|
-
def pushl(self, *ds: D) -> None: ...
|
|
16
|
-
def pushr(self, *ds: D) -> None: ...
|
|
17
|
-
def popl(self) -> MayBe[D]: ...
|
|
18
|
-
def popr(self) -> MayBe[D]: ...
|
|
19
|
-
def peakl(self) -> MayBe[D]: ...
|
|
20
|
-
def peakr(self) -> MayBe[D]: ...
|
|
21
|
-
@overload
|
|
22
|
-
def foldl[L](self, f: Callable[[D, D], D]) -> MayBe[D]: ...
|
|
23
|
-
@overload
|
|
24
|
-
def foldl[L](self, f: Callable[[L, D], L], start: L) -> MayBe[L]: ...
|
|
25
|
-
@overload
|
|
26
|
-
def foldr[R](self, f: Callable[[D, D], D]) -> MayBe[D]: ...
|
|
27
|
-
@overload
|
|
28
|
-
def foldr[R](self, f: Callable[[D, R], R], start: R) -> MayBe[R]: ...
|
|
29
|
-
def map[U](self, f: Callable[[D], U]) -> DEQueue[U]: ...
|
|
30
|
-
|
|
31
|
-
def de_queue[D](*ds: D) -> DEQueue[D]: ...
|
pythonic_fp/queues/fifo.pyi
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from collections.abc import Callable, Iterable, Iterator
|
|
2
|
-
from pythonic_fp.fptools.maybe import MayBe
|
|
3
|
-
from typing import overload
|
|
4
|
-
|
|
5
|
-
__all__ = ['FIFOQueue', 'fifo_queue']
|
|
6
|
-
|
|
7
|
-
class FIFOQueue[D]:
|
|
8
|
-
def __init__(self, *dss: Iterable[D]) -> None: ...
|
|
9
|
-
def __bool__(self) -> bool: ...
|
|
10
|
-
def __len__(self) -> int: ...
|
|
11
|
-
def __eq__(self, other: object) -> bool: ...
|
|
12
|
-
def __iter__(self) -> Iterator[D]: ...
|
|
13
|
-
def copy(self) -> FIFOQueue[D]: ...
|
|
14
|
-
def push(self, *ds: D) -> None: ...
|
|
15
|
-
def pop(self) -> MayBe[D]: ...
|
|
16
|
-
def peak_last_in(self) -> MayBe[D]: ...
|
|
17
|
-
def peak_next_out(self) -> MayBe[D]: ...
|
|
18
|
-
@overload
|
|
19
|
-
def fold[T](self, f: Callable[[D, D], D]) -> MayBe[D]: ...
|
|
20
|
-
@overload
|
|
21
|
-
def fold[T](self, f: Callable[[T, D], T], start: T) -> MayBe[T]: ...
|
|
22
|
-
def map[U](self, f: Callable[[D], U]) -> FIFOQueue[U]: ...
|
|
23
|
-
|
|
24
|
-
def fifo_queue[D](*ds: D) -> FIFOQueue[D]: ...
|
pythonic_fp/queues/lifo.pyi
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
from collections.abc import Callable, Iterable, Iterator
|
|
2
|
-
from pythonic_fp.fptools.maybe import MayBe
|
|
3
|
-
from typing import overload
|
|
4
|
-
|
|
5
|
-
__all__ = ['LIFOQueue', 'lifo_queue']
|
|
6
|
-
|
|
7
|
-
class LIFOQueue[D]:
|
|
8
|
-
def __init__(self, *dss: Iterable[D]) -> None: ...
|
|
9
|
-
def __bool__(self) -> bool: ...
|
|
10
|
-
def __len__(self) -> int: ...
|
|
11
|
-
def __eq__(self, other: object) -> bool: ...
|
|
12
|
-
def __iter__(self) -> Iterator[D]: ...
|
|
13
|
-
def copy(self) -> LIFOQueue[D]: ...
|
|
14
|
-
def push(self, *ds: D) -> None: ...
|
|
15
|
-
def pop(self) -> MayBe[D]: ...
|
|
16
|
-
def peak(self) -> MayBe[D]: ...
|
|
17
|
-
@overload
|
|
18
|
-
def fold[T](self, f: Callable[[D, D], D]) -> MayBe[D]: ...
|
|
19
|
-
@overload
|
|
20
|
-
def fold[T](self, f: Callable[[T, D], T], start: T) -> MayBe[T]: ...
|
|
21
|
-
def map[U](self, f: Callable[[D], U]) -> LIFOQueue[U]: ...
|
|
22
|
-
|
|
23
|
-
def lifo_queue[D](*ds: D) -> LIFOQueue[D]: ...
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pythonic-fp-queues
|
|
3
|
-
Version: 5.1.3
|
|
4
|
-
Summary: Queues
|
|
5
|
-
Keywords: queue,fifo,lifo,dqueue
|
|
6
|
-
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
|
-
Requires-Python: >=3.13
|
|
8
|
-
Description-Content-Type: text/x-rst
|
|
9
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
-
Classifier: Framework :: Pytest
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
-
Classifier: Typing :: Typed
|
|
16
|
-
License-File: LICENSE
|
|
17
|
-
Requires-Dist: pythonic-fp-circulararray>=6.0.4
|
|
18
|
-
Requires-Dist: pythonic-fp-fptools>=5.2.0
|
|
19
|
-
Requires-Dist: pythonic-fp-gadgets>=4.1.0
|
|
20
|
-
Requires-Dist: pytest>=8.4.1 ; extra == "test"
|
|
21
|
-
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-queues/blob/main/CHANGELOG.rst
|
|
22
|
-
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/projects/queues.html
|
|
23
|
-
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
|
|
24
|
-
Project-URL: Source, https://github.com/grscheller/pythonic-fp-queues
|
|
25
|
-
Provides-Extra: test
|
|
26
|
-
|
|
27
|
-
Pythonic FP - Queues
|
|
28
|
-
====================
|
|
29
|
-
|
|
30
|
-
PyPI project
|
|
31
|
-
`pythonic-fp-queues
|
|
32
|
-
<https://pypi.org/project/pythonic-fp-queues>`_.
|
|
33
|
-
|
|
34
|
-
+-------------------------+-----------+--------------------------+
|
|
35
|
-
| module | class | name |
|
|
36
|
-
+=========================+===========+==========================+
|
|
37
|
-
| pythonic_fp.queues.fifo | FIFOQueue | First-In-First-Out Queue |
|
|
38
|
-
+-------------------------+-----------+--------------------------+
|
|
39
|
-
| pythonic_fp.queues.lifo | LIFOQueue | Last-In-First-Out Queue |
|
|
40
|
-
+-------------------------+-----------+--------------------------+
|
|
41
|
-
| pythonic_fp.queues.de | DEQueue | Double-Ended Queue |
|
|
42
|
-
+-------------------------+-----------+--------------------------+
|
|
43
|
-
|
|
44
|
-
Part of the
|
|
45
|
-
`pythonic-fp
|
|
46
|
-
<https://grscheller.github.io/pythonic-fp/>`_
|
|
47
|
-
PyPI projects.
|
|
48
|
-
|
|
49
|
-
Documentation
|
|
50
|
-
-------------
|
|
51
|
-
|
|
52
|
-
Documentation and other links for this project are hosted on
|
|
53
|
-
`GitHub Pages
|
|
54
|
-
<https://grscheller.github.io/pythonic-fp/projects/queues.html>`_.
|
|
55
|
-
|
|
56
|
-
Documentation for this project is hosted on
|
|
57
|
-
`GitHub Pages
|
|
58
|
-
<https://grscheller.github.io/pythonic-fp-queues/development/html/>`_.
|
|
59
|
-
|
|
60
|
-
Copyright and License
|
|
61
|
-
---------------------
|
|
62
|
-
|
|
63
|
-
Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
64
|
-
License, Version 2.0. See the LICENSE file for details.
|
|
65
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
pythonic_fp/queues/__init__.py,sha256=NOkkXOQaHmiemvY4Ke5ZdFJCl3_P3bmV87Xz5Y-R9cU,1028
|
|
2
|
-
pythonic_fp/queues/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
pythonic_fp/queues/de.py,sha256=ICPHkGz0JKIk8aLk75ZUSPS6T9jSTynkJ-2A5Sy_iig,8532
|
|
4
|
-
pythonic_fp/queues/de.pyi,sha256=db74UiSLFme25Yhc28Hhw3EKb2GfvU4wNBJtkTlr_e4,1150
|
|
5
|
-
pythonic_fp/queues/fifo.py,sha256=qQhv57VuF2QuaRtGJhCtj5qtGPjoGKlQS9RbZIGsvmY,6803
|
|
6
|
-
pythonic_fp/queues/fifo.pyi,sha256=19TGU3Qg91hCLo5A-5p9vmREcl38EUWhIAvJZtlb1eA,885
|
|
7
|
-
pythonic_fp/queues/lifo.py,sha256=lQAzoCOzQrw3gF2A_GgF_4XkYpNivswPyZS-Qp5bxYw,6471
|
|
8
|
-
pythonic_fp/queues/lifo.pyi,sha256=HdJ-t7R2w3VfCT06raCTXespdUZfpBgMepBlcxDvyuk,832
|
|
9
|
-
pythonic_fp/queues/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
pythonic_fp_queues-5.1.3.dist-info/licenses/LICENSE,sha256=IJMkVWQUVy-SonK6SMaMotDQ6Zb-lVi2bUTiGp1GUO8,10774
|
|
11
|
-
pythonic_fp_queues-5.1.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
12
|
-
pythonic_fp_queues-5.1.3.dist-info/METADATA,sha256=CeQO0Dt1zxfeu94F7ziEET_hegfeZUjlpzzoIzzdQr4,2392
|
|
13
|
-
pythonic_fp_queues-5.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|