dtools.circular-array 3.9.0__py3-none-any.whl → 3.9.1__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,4 +1,4 @@
1
- # Copyright 2016-2025 Geoffrey R. Scheller
1
+ # Copyright 2023-2025 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.
@@ -14,14 +14,15 @@
14
14
 
15
15
  """### Circular Array
16
16
 
17
- Package for an indexable circular array data structure.
17
+ Package for an indexable, sliceable circular array data structure.
18
18
 
19
19
  #### Modules
20
20
 
21
- * module dtools.circular_array.ca: circular array Python data structure
21
+ * module dtools.circular_array.ca: circular array data structure
22
22
 
23
23
  """
24
- __version__ = "3.9.0"
24
+ __version__ = "3.9.1"
25
25
  __author__ = "Geoffrey R. Scheller"
26
26
  __copyright__ = "Copyright (c) 2023-2025 Geoffrey R. Scheller"
27
27
  __license__ = "Apache License 2.0"
28
+
@@ -15,10 +15,15 @@
15
15
  """### Indexable circular array data structure module."""
16
16
  from __future__ import annotations
17
17
  from collections.abc import Callable, Iterable, Iterator, Sequence
18
- from typing import Any, cast, Never, overload
18
+ from typing import Any, cast, Never, overload, TypeVar
19
19
 
20
20
  __all__ = [ 'ca', 'CA' ]
21
21
 
22
+ D = TypeVar('D')
23
+ L = TypeVar('L')
24
+ R = TypeVar('R')
25
+ U = TypeVar('U')
26
+
22
27
  class ca[D](Sequence[D]):
23
28
  """
24
29
  #### Indexable circular array data structure
@@ -34,7 +39,7 @@ class ca[D](Sequence[D]):
34
39
  * lowercase class name choosen to match built-ins like `list` and `tuple`
35
40
  * raises `IndexError` for out-of-bounds indexing
36
41
  * raises `ValueError` for popping from or folding an empty `ca`
37
- * raises `TypeError` if more than 2 arguments are passed to constructor
42
+ * raises `TypeError` if 2 or more arguments are passed to constructor
38
43
 
39
44
  """
40
45
  __slots__ = '_data', '_cnt', '_cap', '_front', '_rear'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dtools.circular-array
3
- Version: 3.9.0
3
+ Version: 3.9.1
4
4
  Summary: ### Circular Array
5
5
  Keywords: circular array,circle array,CA,double ended queue,dequeue,dqueue,pop,push,popL,popR,pushL,pushR,indexable,auto-resizing,auto resizing,resizing
6
6
  Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
@@ -19,10 +19,10 @@ Project-URL: Documentation, https://grscheller.github.io/dtools-docs/circular-ar
19
19
  Project-URL: Source, https://github.com/grscheller/dtools-circular-array
20
20
  Provides-Extra: test
21
21
 
22
- # Python Circular Array Implementation
22
+ # Developer Tools - Circular Array Implementation
23
23
 
24
- Python module implementing an indexable, double sided,
25
- auto-resizing queue data structure.
24
+ Python module implementing a full featured, indexable,
25
+ double sided, auto-resizing queue data structure.
26
26
 
27
27
  * **Repositories**
28
28
  * [dtools.circular-array][1] project on *PyPI*
@@ -30,6 +30,9 @@ auto-resizing queue data structure.
30
30
  * **Detailed documentation**
31
31
  * [Detailed API documentation][3] on *GH-Pages*
32
32
 
33
+ This project is part of the
34
+ [Developer Tools for Python][4] **dtools.** namespace project.
35
+
33
36
  ### Overview
34
37
 
35
38
  Useful if used directly as an improved version of a Python List or in
@@ -37,7 +40,8 @@ a "has-a" relationship when implementing other data structures.
37
40
 
38
41
  * O(1) pushes and pops either end.
39
42
  * O(1) indexing
40
- * now fully supports slicing!
43
+ * fully supports slicing
44
+ * iterates over copies of the data allowing ca to mutate
41
45
 
42
46
  ### Usage
43
47
 
@@ -80,6 +84,7 @@ assert len(ca) == 0
80
84
 
81
85
  [1]: https://pypi.org/project/dtools.circular-array
82
86
  [2]: https://github.com/grscheller/dtools-circular-array
83
- [3]: https://grscheller.github.io/dtools-namespace-docs/circular-array/
87
+ [3]: https://grscheller.github.io/dtools-docs/circular-array
88
+ [4]: https://github.com/grscheller/dtools-docs
84
89
 
85
90
 
@@ -0,0 +1,7 @@
1
+ dtools/circular_array/__init__.py,sha256=HdCpPnMesO8z3CGuoNfqMjYLRmiedHYdcQTGE6e6qf8,922
2
+ dtools/circular_array/ca.py,sha256=a-hcJ4hQhLexqX2fqsOogEIPjpzR8PQ5zAE49-Xi8tc,15722
3
+ dtools/circular_array/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ dtools_circular_array-3.9.1.dist-info/LICENSE,sha256=csqbZRvA3Nyuav1aszWvswE8CZtaKr-hMjjjcKqms7w,10774
5
+ dtools_circular_array-3.9.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
6
+ dtools_circular_array-3.9.1.dist-info/METADATA,sha256=r80WBcYr2g_k-1uH27NICHx3be6BuKivHiI5tGyMtBY,2717
7
+ dtools_circular_array-3.9.1.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- dtools/circular_array/__init__.py,sha256=yHBn_zsWPfiTPmcdYe4XyO6I6tbx9RTMDBukau6zXWg,917
2
- dtools/circular_array/ca.py,sha256=qoOjG-m_Z2XlYqRAA4w0HxSUaqz_U3E-7bpzqK-vtQY,15646
3
- dtools/circular_array/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- dtools_circular_array-3.9.0.dist-info/LICENSE,sha256=csqbZRvA3Nyuav1aszWvswE8CZtaKr-hMjjjcKqms7w,10774
5
- dtools_circular_array-3.9.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
6
- dtools_circular_array-3.9.0.dist-info/METADATA,sha256=UgiPcUtbURZgznj3dUJjcOB5LDfEQeisr5vpN2PoAa4,2512
7
- dtools_circular_array-3.9.0.dist-info/RECORD,,