swizzle 2.3.6__py3-none-any.whl → 2.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.
- swizzle/__init__.py +2 -2
- {swizzle-2.3.6.dist-info → swizzle-2.4.0.dist-info}/METADATA +2 -2
- swizzle-2.4.0.dist-info/RECORD +7 -0
- swizzle-2.3.6.dist-info/RECORD +0 -7
- {swizzle-2.3.6.dist-info → swizzle-2.4.0.dist-info}/WHEEL +0 -0
- {swizzle-2.3.6.dist-info → swizzle-2.4.0.dist-info}/licenses/LICENSE +0 -0
- {swizzle-2.3.6.dist-info → swizzle-2.4.0.dist-info}/top_level.txt +0 -0
swizzle/__init__.py
CHANGED
@@ -38,11 +38,11 @@ MISSING = object()
|
|
38
38
|
def swizzledtuple(
|
39
39
|
typename,
|
40
40
|
field_names,
|
41
|
+
arrange_names=None,
|
41
42
|
*,
|
42
43
|
rename=False,
|
43
44
|
defaults=None,
|
44
45
|
module=None,
|
45
|
-
arrange_names=None,
|
46
46
|
sep=None,
|
47
47
|
):
|
48
48
|
"""
|
@@ -187,7 +187,7 @@ def swizzledtuple(
|
|
187
187
|
if num_fields == 1:
|
188
188
|
arg_list += ","
|
189
189
|
repr_fmt = "(" + ", ".join(f"{name}=%r" for name in arrange_names) + ")"
|
190
|
-
_dict, _tuple, _len,
|
190
|
+
_dict, _tuple, _len, _zip = dict, tuple, len, zip
|
191
191
|
|
192
192
|
namespace = {
|
193
193
|
"_tuple_new": tuple_new,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: swizzle
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.4.0
|
4
4
|
Summary: Swizzle enables the retrieval of multiple attributes, similar to swizzling in computer graphics.
|
5
5
|
Author-email: "Jan T. Müller" <mail@jantmueller.com>
|
6
6
|
License: MIT
|
@@ -124,7 +124,7 @@ Create swizzled named tuples inspired by `namedtuple`:
|
|
124
124
|
```python
|
125
125
|
from swizzle import swizzledtuple
|
126
126
|
|
127
|
-
Vector = swizzledtuple('Vector', 'x y z')
|
127
|
+
Vector = swizzledtuple('Vector', 'x y z') # Equivalent to swizzle.t('Vector', 'x y z')
|
128
128
|
|
129
129
|
v = Vector(1, 2, 3)
|
130
130
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
swizzle/__init__.py,sha256=-TULOghrDcJWrIHvSG_j7r2_PxTaB_kxU3oVis5dBHw,20636
|
2
|
+
swizzle/trie.py,sha256=fa5iRR-6dZ8nHsuqalGxH40uYiP5Ge7Kc4r51aCOwbk,1355
|
3
|
+
swizzle-2.4.0.dist-info/licenses/LICENSE,sha256=WDAegKWtl3rZUiN-SQ2FEQQwEFxlM_jEKQyJRJawJXo,1070
|
4
|
+
swizzle-2.4.0.dist-info/METADATA,sha256=tiejU_zOQ6gK73kfuIW9p4jaJr6cXj0Jjkyc8Y-7WIM,5575
|
5
|
+
swizzle-2.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
+
swizzle-2.4.0.dist-info/top_level.txt,sha256=XFSQti81x2zM0zAMCY1YD0lqB1eSg5my9BB03uFgCic,8
|
7
|
+
swizzle-2.4.0.dist-info/RECORD,,
|
swizzle-2.3.6.dist-info/RECORD
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
swizzle/__init__.py,sha256=Vmm7VJxtDci2_3X5eoJCloN8HUNPVC98Ti3ORR6jR6I,20647
|
2
|
-
swizzle/trie.py,sha256=fa5iRR-6dZ8nHsuqalGxH40uYiP5Ge7Kc4r51aCOwbk,1355
|
3
|
-
swizzle-2.3.6.dist-info/licenses/LICENSE,sha256=WDAegKWtl3rZUiN-SQ2FEQQwEFxlM_jEKQyJRJawJXo,1070
|
4
|
-
swizzle-2.3.6.dist-info/METADATA,sha256=0842gc0BTgJKoI2ZCmxhsfWbpCVMz78-x9E6yQbIZuo,5530
|
5
|
-
swizzle-2.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
-
swizzle-2.3.6.dist-info/top_level.txt,sha256=XFSQti81x2zM0zAMCY1YD0lqB1eSg5my9BB03uFgCic,8
|
7
|
-
swizzle-2.3.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|