attrs v16.3.0 Release Notes
Release Date: 2016-11-24 // over 7 years ago-
๐ Changes: ^
- ๐ Attributes now can have user-defined metadata which greatly improves
attrs
's extensibility.#96 <https://github.com/python-attrs/attrs/pull/96>
_ - Allow for a
__attrs_post_init__()
method that -- if defined -- will get called at the end of theattrs
-generated__init__()
method.#111 <https://github.com/python-attrs/attrs/pull/111>
_ - Added
@attr.s(str=True)
that will optionally create a__str__()
method that is identical to__repr__()
. This is mainly useful withException
\ s and other classes that rely on a useful__str__()
implementation but overwrite the default one through a poor own one. Default Python class behavior is to use__repr__()
as__str__()
anyways.
If you tried using
attrs
withException
\ s and were puzzled by the tracebacks: this option is for you.__name__
is no longer overwritten with__qualname__
forattr.s(slots=True)
classes.#99 <https://github.com/python-attrs/attrs/issues/99>
_
- ๐ Attributes now can have user-defined metadata which greatly improves