swizzle 2.3.6__tar.gz → 2.4.0__tar.gz
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-2.3.6/swizzle.egg-info → swizzle-2.4.0}/PKG-INFO +2 -2
- {swizzle-2.3.6 → swizzle-2.4.0}/README.md +2 -2
- {swizzle-2.3.6 → swizzle-2.4.0}/pyproject.toml +1 -1
- {swizzle-2.3.6 → swizzle-2.4.0}/swizzle/__init__.py +2 -2
- {swizzle-2.3.6 → swizzle-2.4.0/swizzle.egg-info}/PKG-INFO +2 -2
- {swizzle-2.3.6 → swizzle-2.4.0}/LICENSE +0 -0
- {swizzle-2.3.6 → swizzle-2.4.0}/setup.cfg +0 -0
- {swizzle-2.3.6 → swizzle-2.4.0}/setup.py +0 -0
- {swizzle-2.3.6 → swizzle-2.4.0}/swizzle/trie.py +0 -0
- {swizzle-2.3.6 → swizzle-2.4.0}/swizzle.egg-info/SOURCES.txt +0 -0
- {swizzle-2.3.6 → swizzle-2.4.0}/swizzle.egg-info/dependency_links.txt +0 -0
- {swizzle-2.3.6 → swizzle-2.4.0}/swizzle.egg-info/top_level.txt +0 -0
@@ -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
|
|
@@ -103,7 +103,7 @@ Create swizzled named tuples inspired by `namedtuple`:
|
|
103
103
|
```python
|
104
104
|
from swizzle import swizzledtuple
|
105
105
|
|
106
|
-
Vector = swizzledtuple('Vector', 'x y z')
|
106
|
+
Vector = swizzledtuple('Vector', 'x y z') # Equivalent to swizzle.t('Vector', 'x y z')
|
107
107
|
|
108
108
|
v = Vector(1, 2, 3)
|
109
109
|
|
@@ -161,4 +161,4 @@ Inspired by swizzling in graphics programming, Swizzle brings similar flexibilit
|
|
161
161
|
|
162
162
|
---
|
163
163
|
|
164
|
-
Give Swizzle a try and see how it can simplify your Python projects!
|
164
|
+
Give Swizzle a try and see how it can simplify your Python projects!
|
@@ -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
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|