attrs: Attributes without boilerplate.
Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols.
You just specify the attributes to work with and attrs gives you:
a nice human-readable __repr__,
a complete set of comparison methods,
an initializer,
and much more
without writing dull boilerplate code again and again.
This gives you the power to use actual classes with actual types in your code instead of confusing tuples or confusingly behaving namedtuples.
So put down that type-less data structures and welcome some class into your life!
python-attrs is the successor to python-characterstic
- Links to devel:languages:python / python-attrs
- Has a link diff
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout home:frispete:python/python-attrs && cd $_
- Create Badge
Refresh
Refresh
Source Files
Filename | Size | Changed |
---|---|---|
_link | 0000000215 215 Bytes | |
attrs-16.0.0.tar.gz | 0000042535 41.5 KB | |
project.diff | 0000002701 2.64 KB |
Revision 2 (latest revision is 3)
Hans-Peter Jansen (frispete)
committed
(revision 2)
- update to 16.0.0 Backward-incompatible changes: * Python 3.3 and 2.6 aren’t supported anymore. They may work by chance but any effort to keep them working has ceased. The last Python 2.6 release was on October 29, 2013 and isn’t supported by the CPython core team anymore. Major Python packages like Django and Twisted dropped Python 2.6 a while ago already. Python 3.3 never had a significant user base and wasn’t part of any distribution’s LTS release. Changes: * __slots__ have arrived! Classes now can automatically be slots-style (and save your precious memory) just by passing slots=True. #35 * Allow the case of initializing attributes that are set to init=False. This allows for clean initializer parameter lists while being able to initialize attributes to default values. #32 * attr.asdict can now produce arbitrary mappings instead of Python dicts when provided with a dict_factory argument. #40 Multiple performance improvements.
Comments 0