[Python-Dev] PEP 557: Data Classes (original) (raw)
Mike Miller python-dev at mgmiller.net
Thu Sep 14 14:06:15 EDT 2017
- Previous message (by thread): [Python-Dev] PEP 557: Data Classes
- Next message (by thread): [Python-Dev] PEP 557: Data Classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2017-09-14 10:45, Stefan Krah wrote:
I'd expect something like a C struct or an ML record.
Struct is taken, and your second example is record.
from dataclass import dataclass
This is more intuitive, since the PEP example also has attached methods like totalcost(). I don't think this is really common for records.
Every class can be extended, does that mean they can't be given appropriate names?
(Not to mention dataclass is hardly intuitive for something that can have methods added.)
-Mike
- Previous message (by thread): [Python-Dev] PEP 557: Data Classes
- Next message (by thread): [Python-Dev] PEP 557: Data Classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]