Add note about non-PEP 8 compliant function names.
This commit is contained in:
parent
57ccf32901
commit
6b32e0d8ae
13
pep-0557.rst
13
pep-0557.rst
|
@ -752,6 +752,16 @@ through ``__init__`` (unless you suppress its creation). Which
|
|||
approach is more appropriate will be application-specific, but both
|
||||
approaches are supported.
|
||||
|
||||
asdict and astuple function names
|
||||
---------------------------------
|
||||
|
||||
The names of the module-level helper functions ``asdict()`` and
|
||||
``astuple()`` are arguably not PEP 8 compliant, and should be
|
||||
``as_dict()`` and ``as_tuple()``, respectively. However, after
|
||||
discussion [#]_ it was decided to keep consistency with
|
||||
``namedtuple._asdict()`` and ``attr.asdict()``.
|
||||
|
||||
|
||||
Rejected ideas
|
||||
==============
|
||||
|
||||
|
@ -918,6 +928,9 @@ References
|
|||
.. [#] why not just attrs?
|
||||
(https://github.com/ericvsmith/dataclasses/issues/19)
|
||||
|
||||
.. [#] PEP 8 names for asdict and astuple
|
||||
(https://github.com/ericvsmith/dataclasses/issues/110)
|
||||
|
||||
.. [#] Copying mutable defaults
|
||||
(https://github.com/ericvsmith/dataclasses/issues/3)
|
||||
|
||||
|
|
Loading…
Reference in New Issue