diff --git a/pep-0557.rst b/pep-0557.rst index 5cfed73b2..f2ad9e4d7 100644 --- a/pep-0557.rst +++ b/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)