On 12 October 2017 at 14:49, Mike Miller <python-...@mgmiller.net> wrote:

>
> On 2017-10-11 19:56, Nick Coghlan wrote:
>
>>  From my perspective, the main benefit of a compound name like "data
>> class" is that it emphasises a deliberate behavioural choice (adopted from
>> attrs): data classes are just regular classes, with some definition time
>> logic to help define data fields.
>>
>
> IMO, the problem with the dataclass name isn't the data part, but the
> "class" part.  No other class has "class" in its name(?), not even object.
> The Department of Redundancy Department will love it.
>
> If it must be a compound name, it should rather be dataobject, no?
>

No, because dataclass is the name of a class decorator ("This class is a
data class"), not the name of a type.

It's akin to "static method", "class method", and "instance method" for
function definitions (although the last one isn't a typical decorator,
since it's the default behaviour for functions placed inside a class).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to