A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149549.html below:

[Python-Dev] PEP 557: Data Classes

[Python-Dev] PEP 557: Data ClassesMike Miller python-dev at mgmiller.net
Thu Sep 14 13:24:52 EDT 2017
On 2017-09-12 21:05, Guido van Rossum wrote:
> It's ironic that some people dislike "data classes" because these are regular 
> classes, not just for data, while others are proposing alternative names that 
> emphasize the data container aspect. So "data classes" splits the difference, by 
> referring to both data and classes.

True that these data-classes will be a superset of a traditional record.  But, 
we already have objects and inheritance for those use cases.  The data-class is 
meant to be used primarily like a record, so why not name it that way?

Almost everything is extensible in Python; that shouldn't prevent focused names, 
should it?


> Let's bikeshed about something else.

An elegant name can make the difference between another obscure module thrown in 
the stdlib to be never seen again and one that gets used every day.  Which is 
more intuitive?

     from collections import record

     from dataclass import dataclass



Would the language be as nice if "object" was named an "instanceclass?"  Or 
perhaps the "requests" module could have been named "httpcall."  Much of the 
reluctance to use the attrs module is about its weird naming.

Due to the fact that this is a simple, potentially ubiquitous enhancement an 
elegant name is important.  "For humans," or something, haha.

-Mike
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4