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
_______________________________________________
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