py-doubly-linked-list 0.1.0__cp313-cp313-musllinux_1_2_aarch64.whl → 0.1.1__cp313-cp313-musllinux_1_2_aarch64.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.

Potentially problematic release.


This version of py-doubly-linked-list might be problematic. Click here for more details.

@@ -1,21 +1,48 @@
1
- from typing import Iterable, Any
1
+ from typing import Iterable, Any, Self
2
+ from collections.abc import Callable
2
3
 
3
4
  class DoublyLinkedList:
4
5
  def __init__(self, Iterable: Iterable) -> None: ...
5
- def append(self, object: Any, forward: bool = True) -> None: ...
6
- def clear(self) -> None: ...
7
- def copy(self) -> DoublyLinkedList: ...
8
- def count(self, value: Any) -> int: ...
9
- def extend(self, iterable: Iterable, forward: bool = True) -> None: ...
10
- def index(self, value: Any, start: int, stop: int) -> int: ...
11
- def insert(self, object: Any, index: int, forward: bool = True) -> None: ...
12
- def pop(self, index: int = -1) -> Any: ...
13
- def remove(self, value: Any) -> None: ...
14
- def reverse(self) -> None: ...
6
+ def append(self, object: Any, forward: bool = True)-> None:
7
+ """Append object to the end of the list. Set forward to false to append to the start."""
8
+ ...
9
+ def clear(self) -> None:
10
+ """Remove all items from the list."""
11
+ ...
12
+ def copy(self) -> DoublyLinkedList:
13
+ """Return a shallow copy of the list."""
14
+ ...
15
+ def count(self, value: Any) -> int:
16
+ """Return number of occurrences of value in the list."""
17
+ ...
18
+ def extend(self, iterable: Iterable, forward: bool = True) -> None:
19
+ """Extend list by appending elements from the iterable. Set forward to false to extend from the start."""
20
+ ...
21
+ def index(self, value: Any, start: int, stop: int) -> int:
22
+ """Return first index of value.
23
+ Raises ValueError if the value is not present."""
24
+ ...
25
+ def insert(self, object: Any, index: int, forward: bool = True) -> None:
26
+ """Insert object after index. Set forward to false to insert before index."""
27
+ ...
28
+ def pop(self, index: int = -1) -> Any:
29
+ """Remove and return item at index (default last).
30
+ Raises IndexError if list is empty or index is out of range."""
31
+ ...
32
+ def remove(self, value: Any) -> None:
33
+ """Remove first occurence of value.
34
+ Raises ValueError if the value is not present."""
35
+ ...
36
+ def reverse(self) -> None:
37
+ """Reverse the order of the list."""
38
+ ...
39
+ def sort(self: DoublyLinkedList, key: Callable, reverse: bool = False) -> None:
40
+ """In-place sort in ascending order, equal objects are not swapped. Key can be applied to values and the list will be sorted based on the result of applying the key. Reverse will reverse the sort order."""
41
+ ...
15
42
  def __add__(self, Iterable: Iterable) -> DoublyLinkedList: ...
16
43
  def __contains__(self, Any: Any) -> bool: ...
17
44
  def __delitem__(self, Any: Any) -> None: ...
18
45
  def __getitem__(self, Index: int) -> Any: ...
19
- def __iadd__(self, Iterable: Iterable) -> None: ...
46
+ def __iadd__(self, Iterable: Iterable) -> Self: ...
20
47
  def __len__(self) -> int: ...
21
- def __setitem__(self, Index: int, Object: Any) -> None: ...
48
+ def __setitem__(self, Index: int, Object: Any) -> None: ...
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-doubly-linked-list
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A library adding doubly linked lists to python.
5
5
  Author-email: Joshua Morningstar <joshuam18745@gmail.com>
6
+ Maintainer-email: Joshua Morningstar <joshuam18745@gmail.com>
6
7
  License-Expression: MIT
7
8
  Project-URL: Documentation, https://github.com/JoshuaM176/PyDoublyLinkedList/blob/main/README.MD
8
9
  Project-URL: Repository, https://github.com/JoshuaM176/PyDoublyLinkedList
@@ -78,6 +79,11 @@ Reverse the order of the list.
78
79
  ```Python
79
80
  doubly_linked_list.reverse()
80
81
  ```
82
+ - sort
83
+ In-place sort in ascending order, equal objects are not swapped. Key can be applied to values and the list will be sorted based on the result of applying the key. Reverse will reverse the sort order.
84
+ ```Python
85
+ doubly_linked_list.sort(key: Callable = None, reverse: bool = False)
86
+ ```
81
87
  The DoublyLinkedList also supports:
82
88
  - concatenation with other iterables
83
89
  - in-place concatenation with other iterables
@@ -86,7 +92,6 @@ The DoublyLinkedList also supports:
86
92
  - iterating
87
93
 
88
94
  Things that are not currently supported but might be in the future:
89
- - sorting
90
95
  - assigning slices
91
96
  - repeating, i.e list = [1] * 5 create a list with 1 repeated 5 times
92
97
 
@@ -0,0 +1,9 @@
1
+ py_doubly_linked_list/__init__.py,sha256=yr4gaBVd4p_p8w2baBhpKltQ_o75jiU5YIELuJ5U5zI,48
2
+ py_doubly_linked_list/__init__.pyi,sha256=jDSilZoS6Luv8uOq19fkfWFjkRQxX-If69zAMnUg8SA,2297
3
+ py_doubly_linked_list/doubly_linked_list.cpython-313-aarch64-linux-musl.so,sha256=7OLASZQEUmvVgNhbUcuwDbzP3E4P99NQzuoxldK4xp8,160080
4
+ py_doubly_linked_list-0.1.1.dist-info/METADATA,sha256=NROd3rktTc9ya7DBY1wHGciyW6nv3RmnUEo3xLufBx0,4645
5
+ py_doubly_linked_list-0.1.1.dist-info/WHEEL,sha256=3IjWZRuuq2q-vKtU0x2XxSbfx92VUEmTDWR0AUEtZxI,113
6
+ py_doubly_linked_list-0.1.1.dist-info/top_level.txt,sha256=8eaqZ5zvqWobW61EaJ1AudwZk29Tp4A6Y_c4FVwxz24,22
7
+ py_doubly_linked_list-0.1.1.dist-info/RECORD,,
8
+ py_doubly_linked_list-0.1.1.dist-info/licenses/LICENSE,sha256=OXmDBD9VgR2KHXaevu57Mkg9T-H1ex_G2qqXbDhHeYw,1064
9
+ py_doubly_linked_list-0.1.1.dist-info/licenses/README.MD,sha256=bJfYV4EPaFJ-Lo94oGyQnvkUVG_5Nt6yGnl18GYBWks,3424
@@ -52,6 +52,11 @@ Reverse the order of the list.
52
52
  ```Python
53
53
  doubly_linked_list.reverse()
54
54
  ```
55
+ - sort
56
+ In-place sort in ascending order, equal objects are not swapped. Key can be applied to values and the list will be sorted based on the result of applying the key. Reverse will reverse the sort order.
57
+ ```Python
58
+ doubly_linked_list.sort(key: Callable = None, reverse: bool = False)
59
+ ```
55
60
  The DoublyLinkedList also supports:
56
61
  - concatenation with other iterables
57
62
  - in-place concatenation with other iterables
@@ -60,7 +65,6 @@ The DoublyLinkedList also supports:
60
65
  - iterating
61
66
 
62
67
  Things that are not currently supported but might be in the future:
63
- - sorting
64
68
  - assigning slices
65
69
  - repeating, i.e list = [1] * 5 create a list with 1 repeated 5 times
66
70
 
@@ -1,9 +0,0 @@
1
- py_doubly_linked_list/__init__.py,sha256=yr4gaBVd4p_p8w2baBhpKltQ_o75jiU5YIELuJ5U5zI,48
2
- py_doubly_linked_list/__init__.pyi,sha256=CzbKc1rwiJSMqON5YdXGSpYV0PaokyVIuPeFxlyQG9A,1025
3
- py_doubly_linked_list/doubly_linked_list.cpython-313-aarch64-linux-musl.so,sha256=flnjZLK7buOeuKLhGcI9phYian6DOY8rtZvG2UE5itA,154080
4
- py_doubly_linked_list-0.1.0.dist-info/METADATA,sha256=sil1fAvagDMptxnLWt46Tlqxi-6Dv0Zc6a10tkGG-oA,4301
5
- py_doubly_linked_list-0.1.0.dist-info/WHEEL,sha256=3IjWZRuuq2q-vKtU0x2XxSbfx92VUEmTDWR0AUEtZxI,113
6
- py_doubly_linked_list-0.1.0.dist-info/top_level.txt,sha256=8eaqZ5zvqWobW61EaJ1AudwZk29Tp4A6Y_c4FVwxz24,22
7
- py_doubly_linked_list-0.1.0.dist-info/RECORD,,
8
- py_doubly_linked_list-0.1.0.dist-info/licenses/LICENSE,sha256=OXmDBD9VgR2KHXaevu57Mkg9T-H1ex_G2qqXbDhHeYw,1064
9
- py_doubly_linked_list-0.1.0.dist-info/licenses/README.MD,sha256=oCATHYWOL7zVn32oJiTDx-gv-sfPpqfgXBqg3BxjDpg,3142