[Python-Dev] Concerns about method overriding and subclassing with dataclasses (original) (raw)
Chris Barker chris.barker at noaa.gov
Mon Jan 1 23:44:21 EST 2018
- Previous message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Next message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jan 1, 2018 at 7:50 PM, Ethan Smith <ethan at ethanhs.me> wrote:
Will you get the "right" repr now if you derive a datacalss from a dataclass? That would be a nice feature.
The repr will be generated by the child dataclass unless the user overrides it. So I believe this is the "right" repr.
what I was wondering is if the child will know about all the fields in the parent -- so it could make a full repr.
-CHB
~>Ethan Smith
-CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE <https://maps.google.com/?q=7600+Sand+Point+Way+NE&entry=gmail&source=g> (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ethan% 40ethanhs.me
--
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180101/d55f84d5/attachment.html>
- Previous message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Next message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]