swizzle 0.1.2__py3-none-any.whl → 0.1.4__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 CHANGED
@@ -2,7 +2,7 @@ from functools import wraps
2
2
  import sys
3
3
  import types
4
4
 
5
- __version__ = "0.1.2"
5
+ __version__ = "0.1.4"
6
6
 
7
7
  def _split(s, sep):
8
8
  if sep == '':
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: swizzle
3
- Version: 0.1.2
4
- Summary: Transforms a string representation of a Python literal into the corresponding Python object.
3
+ Version: 0.1.4
4
+ Summary: The Swizzle Decorator enables the retrieval of multiple attributes, similar to swizzling in computer graphics.
5
5
  Home-page: https://github.com/janthmueller/swizzle
6
6
  Author: Jan T. Müller
7
7
  Author-email: mail@jantmueller.com
@@ -77,7 +77,7 @@ class XYZ(IntEnum):
77
77
  Z = 3
78
78
 
79
79
  # Test the swizzle
80
- print(XYZ.yxz) # Output: (<XYZ.Y: 2>, <XYZ.X: 1>, <XYZ.Z: 3>)
80
+ print(XYZ.YXZ) # Output: (<XYZ.Y: 2>, <XYZ.X: 1>, <XYZ.Z: 3>)
81
81
  ```
82
82
  Setting the `meta` argument to `True` in the swizzle decorator extends the `getattr` behavior of the metaclass, enabling attribute swizzling directly on the class itself.
83
83
 
@@ -121,3 +121,6 @@ print(Test.xyyz) # Output: (4, 5)
121
121
  print(Test.xyzx) # Output: (7, 1)
122
122
  ```
123
123
 
124
+ ## To Do
125
+ - [ ] Add support for module-level swizzling
126
+ - [ ] Swizzle for method args (swizzle+partial)
@@ -0,0 +1,5 @@
1
+ swizzle/__init__.py,sha256=AX8PGVBeBQIy3EdF8iu3IV6H7UfoU50C8DBvuVOAgXY,2684
2
+ swizzle-0.1.4.dist-info/METADATA,sha256=s3wRwoiAxpPOg2RzAbnarDSe7sIxBhjy_6M5W0_S3Sw,3010
3
+ swizzle-0.1.4.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
4
+ swizzle-0.1.4.dist-info/top_level.txt,sha256=XFSQti81x2zM0zAMCY1YD0lqB1eSg5my9BB03uFgCic,8
5
+ swizzle-0.1.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: setuptools (72.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,5 +0,0 @@
1
- swizzle/__init__.py,sha256=xWLQSOHFJ3eK_I5tnY5LLybU6IbsPocwz-3LmEunDVw,2684
2
- swizzle-0.1.2.dist-info/METADATA,sha256=fkh4lJnUzFmgHWaZWp5q5JRNHO7puyjPxvAjS578Fkk,2890
3
- swizzle-0.1.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
4
- swizzle-0.1.2.dist-info/top_level.txt,sha256=XFSQti81x2zM0zAMCY1YD0lqB1eSg5my9BB03uFgCic,8
5
- swizzle-0.1.2.dist-info/RECORD,,