The 'attrs' library is now available within Mercurial -- a better namedtuple
Siddharth Agarwal
sid at less-broken.com
Sun Oct 1 14:16:18 UTC 2017
Hi everyone --
The attrs library is now available to use within Mercurial as
'mercurial.thirdparty.attrs'. attrs is basically a better version of
collections.namedtuple with none of the weird semantics (e.g. you can't
compare a tuple and an attr) and no runtime performance cost (especially
with slots turned on).
The documentation for attrs is available at [1]. See e51c8ffa1ffa [2]
for an example of how to use attrs.
Please feel free to send cleanup patches to move existing tuples or
namedtuples to use attrs.
[1] http://www.attrs.org/en/stable/
[2] https://www.mercurial-scm.org/repo/hg/rev/e51c8ffa1ffa
More information about the Mercurial-devel
mailing list