attrs 26.1.0
devel/py-attrs
Python attributes without boilerplate
Description
attrs is an MIT-licensed Python package with class decorators
that ease the chores of implementing the most common attribute-related
object protocols:
>>> import attr
>>> @attr.s
... class C(object):
... x = attr.ib(default=42)
... y = attr.ib(default=attr.Factory(list))
>>> i = C(x=1, y=2)
(If you don't like the playful attr.s and attr.ib, you can also use their
no-nonsense aliases attr.attributes and attr.attr).
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.
Dependencies
- build devel/py-build
- build devel/py-hatch-fancy-pypi-readme
- build devel/py-hatch-vcs
- build devel/py-hatchling
- build devel/py-installer
- build lang/python311
- run lang/python311
Commit History
may be incomplete — full history at freebsd-ports on GitHub
Loading commit history — this may take up to a minute on first view. Reload the page in a moment.