On 12 October 2017 at 14:49, Mike Miller <python-dev at 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 | ncoghlan at gmail.com | Brisbane, Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171012/09358afc/attachment.html>
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