aldict 1.0.1__py3-none-any.whl → 1.0.2__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.
- aldict/alias_dict.py +3 -3
- {aldict-1.0.1.dist-info → aldict-1.0.2.dist-info}/METADATA +2 -1
- aldict-1.0.2.dist-info/RECORD +8 -0
- aldict-1.0.1.dist-info/RECORD +0 -8
- {aldict-1.0.1.dist-info → aldict-1.0.2.dist-info}/LICENSE +0 -0
- {aldict-1.0.1.dist-info → aldict-1.0.2.dist-info}/WHEEL +0 -0
- {aldict-1.0.1.dist-info → aldict-1.0.2.dist-info}/top_level.txt +0 -0
aldict/alias_dict.py
CHANGED
|
@@ -81,10 +81,10 @@ class AliasDict(UserDict):
|
|
|
81
81
|
def __delitem__(self, key):
|
|
82
82
|
try:
|
|
83
83
|
self.data.__delitem__(key)
|
|
84
|
+
self._alias_dict = {k: v for k, v in self._alias_dict.items() if v != key}
|
|
84
85
|
except KeyError:
|
|
85
|
-
# in case we try to delete alias
|
|
86
|
-
|
|
87
|
-
self._alias_dict = {k: v for k, v in self._alias_dict.items() if v != key}
|
|
86
|
+
# in case we try to delete alias via pop() or del
|
|
87
|
+
return self.remove_alias(key)
|
|
88
88
|
|
|
89
89
|
def __contains__(self, item):
|
|
90
90
|
return item in set(self.keys())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aldict
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Multi-key dictionary, supports adding and manipulating key-aliases pointing to shared values
|
|
5
5
|
Author-email: Kaloyan Ivanov <kaloyan.ivanov88@gmail.com>
|
|
6
6
|
Project-URL: repository, https://github.com/kaliv0/aldict
|
|
@@ -25,6 +25,7 @@ Requires-Dist: twine>=6.0.1; extra == "dev"
|
|
|
25
25
|

|
|
26
26
|
[](https://pypi.org/project/aldict/)
|
|
27
27
|
[](https://github.com/kaliv0/aldict/blob/main/LICENSE)
|
|
28
|
+
[](https://pepy.tech/projects/aldict)
|
|
28
29
|
|
|
29
30
|
Multi-key dictionary, supports adding and manipulating key-aliases pointing to shared values
|
|
30
31
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
aldict/__init__.py,sha256=0l5cJ5LuzCZhZfx-IOk2dEsq6nJQTShr6oGmufIa9i4,153
|
|
2
|
+
aldict/alias_dict.py,sha256=j92SVd2RN1pzrClYhxhtdRIWAZ2_eVml3P4jcK4R890,3304
|
|
3
|
+
aldict/exception.py,sha256=rFNmv9HuUOn2toPVYpVPQq6SOsl8nvwtJpGhPkK1puQ,83
|
|
4
|
+
aldict-1.0.2.dist-info/LICENSE,sha256=frOVyHZrx5o-fh5xC-kggT3MaLdp6yxV_YGpVXFHFSQ,1071
|
|
5
|
+
aldict-1.0.2.dist-info/METADATA,sha256=s-n_Y9mIdqTsWZvdlxkE0qH6YSbnN9DwCtw1TjmuM-g,3470
|
|
6
|
+
aldict-1.0.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
+
aldict-1.0.2.dist-info/top_level.txt,sha256=pXwIKxRsbW2_Lh1HM-4cG2xE44RBzMz07GaY2EONV5M,7
|
|
8
|
+
aldict-1.0.2.dist-info/RECORD,,
|
aldict-1.0.1.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
aldict/__init__.py,sha256=0l5cJ5LuzCZhZfx-IOk2dEsq6nJQTShr6oGmufIa9i4,153
|
|
2
|
-
aldict/alias_dict.py,sha256=ElEw3-HqKE7vszGnPiuZ4ZJFJnak3kettz5uKqbRh20,3273
|
|
3
|
-
aldict/exception.py,sha256=rFNmv9HuUOn2toPVYpVPQq6SOsl8nvwtJpGhPkK1puQ,83
|
|
4
|
-
aldict-1.0.1.dist-info/LICENSE,sha256=frOVyHZrx5o-fh5xC-kggT3MaLdp6yxV_YGpVXFHFSQ,1071
|
|
5
|
-
aldict-1.0.1.dist-info/METADATA,sha256=ZvtA-JgXEzTcJ_85CjBdr7fPCBUI3eu76Um_jV8a-yw,3381
|
|
6
|
-
aldict-1.0.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
-
aldict-1.0.1.dist-info/top_level.txt,sha256=pXwIKxRsbW2_Lh1HM-4cG2xE44RBzMz07GaY2EONV5M,7
|
|
8
|
-
aldict-1.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|