pythonic-fp-circulararray 5.3.2__py3-none-any.whl → 5.4.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.
@@ -1,9 +1,15 @@
1
1
  from collections.abc import Callable, Iterable, Iterator
2
+ from typing import overload
2
3
 
3
4
  __all__ = ['CAF', 'caf']
4
5
 
5
6
  class CAF[I]:
6
- def __init__(self, items: Iterable[I] | None = None, capacity: int = 2) -> None: ...
7
+ @overload
8
+ def __init__(self) -> None: ...
9
+ @overload
10
+ def __init__(self, items: Iterable[I]) -> None: ...
11
+ @overload
12
+ def __init__(self, items: Iterable[I], capacity: int) -> None: ...
7
13
  def __iter__(self) -> Iterator[I]: ...
8
14
  def __reversed__(self) -> Iterator[I]: ...
9
15
  def __bool__(self) -> bool: ...
@@ -23,8 +29,14 @@ class CAF[I]:
23
29
  def rotl(self, n: int = 1) -> None: ...
24
30
  def rotr(self, n: int = 1) -> None: ...
25
31
  def map[U](self, f: Callable[[I], U]) -> CAF[U]: ...
26
- def foldl[L](self, f: Callable[[L, I], L], start: L | None = None) -> L: ...
27
- def foldr[R](self, f: Callable[[I, R], R], start: R | None = None) -> R: ...
32
+ @overload
33
+ def foldl[L](self, f: Callable[[I, I], I]) -> I: ...
34
+ @overload
35
+ def foldl[L](self, f: Callable[[L, I], L], start: L) -> L: ...
36
+ @overload
37
+ def foldr[R](self, f: Callable[[I, I], I]) -> I: ...
38
+ @overload
39
+ def foldr[R](self, f: Callable[[I, R], R], start: R) -> R: ...
28
40
  def capacity(self) -> int: ...
29
41
  def empty(self) -> None: ...
30
42
  def fraction_filled(self) -> float: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythonic-fp-circulararray
3
- Version: 5.3.2
3
+ Version: 5.4.0
4
4
  Summary: Circular Array
5
5
  Keywords: auto resizing,circular array,circulararray,dequeue,indexable,pop,push
6
6
  Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
@@ -14,9 +14,10 @@ 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-gadgets>=3.1.0
17
18
  Requires-Dist: pytest>=8.4.1 ; extra == "test"
18
19
  Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-circulararray/blob/main/CHANGELOG.rst
19
- Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/circulararray/development/build/html/releases.html
20
+ Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/circulararray/development/build/html/index.html
20
21
  Project-URL: Homepage, https://github.com/grscheller/pythonic-fp/blob/main/README.md
21
22
  Project-URL: Source, https://github.com/grscheller/pythonic-fp-circulararray
22
23
  Provides-Extra: test
@@ -30,17 +31,31 @@ PyPI project
30
31
 
31
32
  Python module implementing stateful circular array data structures.
32
33
 
33
- - O(1) pops either end
34
- - O(1) amortized pushes either end
35
- - O(1) indexing, fully supports slicing
36
- - Auto-resizing larger when necessary, manually compatible
37
- - iterable, can safely mutate while iterators continue iterating over previous state
38
- - comparisons compare identity before equality, like builtins
39
- - in boolean context returns true when not empty, false when empty
40
-
41
- This PyPI project is part of of the grscheller
42
- `pythonic-fp namespace projects
43
- <https://github.com/grscheller/pythonic-fp/blob/main/README.md>`_
34
+ - variable storage capacity circular array
35
+
36
+ - O(1) pops either end
37
+ - O(1) amortized pushes either end
38
+ - O(1) indexing, fully supports slicing
39
+ - auto-resizing more storage capacity when necessary, manually compatible
40
+ - iterable, safely mutates while iterators iterating over previous state
41
+ - comparisons compare identity before equality, like builtins
42
+ - in boolean context, falsy when empty, otherwise truthy
43
+ - function ``ca`` produces auto-resizing circular array from arguments
44
+
45
+ - fixed storage capacity circular array
46
+
47
+ - O(1) pops and pushes either end
48
+ - O(1) indexing, does not support slicing
49
+ - fixed total storage capacity
50
+ - iterable, safely mutates while iterators iterating over previous state
51
+ - comparisons compare identity before equality, like builtins
52
+ - in boolean context, falsy when either empty or full, otherwise truthy
53
+ - function ``caf`` produces fixed capacity circular array from arguments
54
+
55
+ Part of the
56
+ `pythonic-fp
57
+ <https://grscheller.github.io/pythonic-fp/homepage/build/html/index.html>`_
58
+ PyPI projects.
44
59
 
45
60
  Documentation
46
61
  -------------
@@ -0,0 +1,11 @@
1
+ pythonic_fp/circulararray/__init__.py,sha256=uR0KASmw1Zraz9l3VPbqPm9WUKzWk-0_tUGT0opabzQ,1515
2
+ pythonic_fp/circulararray/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ pythonic_fp/circulararray/auto.py,sha256=mM5kAZnSo4etgA0uSp05VUMGpIOeKXIoCCQ1C3pIETo,19457
4
+ pythonic_fp/circulararray/auto.pyi,sha256=DegIbRFv66Ws4N1J1dExQ6cQJOTZw-XXUEJHi1OgIBk,1861
5
+ pythonic_fp/circulararray/fixed.py,sha256=VhCWBcE0C8toYqGyd9aKJ1bSJu8sHA46AQGJ7mGxYBE,15700
6
+ pythonic_fp/circulararray/fixed.pyi,sha256=Uk0QnXn3_q_6urXeRFEMxsL0gS-3Xa4UsyDRVXk8YoY,1648
7
+ pythonic_fp/circulararray/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ pythonic_fp_circulararray-5.4.0.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
9
+ pythonic_fp_circulararray-5.4.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
10
+ pythonic_fp_circulararray-5.4.0.dist-info/METADATA,sha256=x6ZQX_ItPF3ndJZFS15JOOqKPK01yM6YEf0Y3e9PsK8,2761
11
+ pythonic_fp_circulararray-5.4.0.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- pythonic_fp/circulararray/__init__.py,sha256=4RaMexsQxHwp80j3Z75_td8PGRqLoz1yMvK_ZZ07vi8,1516
2
- pythonic_fp/circulararray/auto.py,sha256=YIBKvnjerpCg8hmcAS-HSSjGRZSD4C7S_RyCNH4FwoE,19502
3
- pythonic_fp/circulararray/auto.pyi,sha256=yfQ2kzIiXFb2Bpg3cMwHwv2oSlyOUMTgmdPZM_-oU_8,1669
4
- pythonic_fp/circulararray/fixed.py,sha256=G58qee_2Rl9e-4hG3vZrQIJTDbpqoECpT-d2M98BcgY,15494
5
- pythonic_fp/circulararray/fixed.pyi,sha256=y_7eMvH18B1lpLPp2P-VkN-xcQVKJn6cOisp9LSBBRk,1362
6
- pythonic_fp/circulararray/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- pythonic_fp_circulararray-5.3.2.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
8
- pythonic_fp_circulararray-5.3.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
9
- pythonic_fp_circulararray-5.3.2.dist-info/METADATA,sha256=DJnFE-yTJU7yhdQNjXA4lTc4tsWWp1zULxsBlN5e46w,2183
10
- pythonic_fp_circulararray-5.3.2.dist-info/RECORD,,