Link to namedtuple confusion

Without any reasons, it looks a bit hand-wavy.
This commit is contained in:
Hynek Schlawack 2017-10-14 18:27:48 +02:00
parent 4a19d9b14d
commit f7f53d4312
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ After *declaring* your attributes ``attrs`` gives you:
*without* writing dull boilerplate code again and again and *without* runtime performance penalties.
This gives you the power to use actual classes with actual types in your code instead of confusing ``tuple``\ s or confusingly behaving ``namedtuple``\ s.
This gives you the power to use actual classes with actual types in your code instead of confusing ``tuple``\ s or `confusingly behaving <http://www.attrs.org/en/stable/why.html#namedtuples>`_ ``namedtuple``\ s.
Which in turn encourages you to write *small classes* that do `one thing well <https://www.destroyallsoftware.com/talks/boundaries>`_.
Never again violate the `single responsibility principle <https://en.wikipedia.org/wiki/Single_responsibility_principle>`_ just because implementing ``__init__`` et al is a painful drag.