<div dir="ltr"><div class="gmail_default" style="font-size:small">​I make this suggestion in trepidation, given that Guido called a halt on the Great Naming Debate, but it seems that a short, neutral name with data connotations previously not a part of many popular subsystems is required.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I therefore propose "row", which is sufficiently neutral to avoid most current opposition and yet a common field-oriented mechanism for accessing units of retrieved data by name.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">regards</div><div class="gmail_default" style="font-size:small"> Steve​</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Steve Holden<br></div></div></div>
<br><div class="gmail_quote">On Sat, Sep 16, 2017 at 3:44 PM, Sven R. Kunze <span dir="ltr"><<a href="mailto:srkunze@mail.de" target="_blank">srkunze@mail.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the PEP! :)<br>
<br>
I like the naming. ;) Though, I would like to add to Michel's argument in favor of a base class.<span class=""><br>
<br>
<br>
On 11.09.2017 08:38, Michel Desmoulin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- I read Guido talking about some base class as alternative to the<br>
generator version, but don't see it in the PEP. Is it still considered ?<br>
</blockquote>
I'm going to put some words in explaining why I don't want to use base<br>
classes (I don't think it buys you anything). Do you have a reason for<br>
preferring base classes?<br>
</blockquote>
Not preferring, but having it as an alternative. Mainly for 2 reasons:<br>
<br>
1 - data classes allow one to type in classes very quickly, let's<br>
harvest the benefit from that.<br>
<br>
Typing a decorator in a shell is much less comfortable than using<br>
inheritance. Same thing about IDE: all current ones have snippet with<br>
auto-switch to the class parents on tab.<br>
<br>
All in all, if you are doing exploratory programming, and thus<br>
disposable code, which data classes are fantastic for, inheritance will<br>
keep you in the flow.<br>
<br>
2 - it will help sell the data classes<br>
<br>
I train a lot of people to Python each year. I never have to explain<br>
classes to people with any kind of programming background. I _always_<br>
have to explain decorators.<br>
<br>
People are not used to it, and even kind fear it for quite some time.<br>
<br>
Inheritance however, is familiar, and will not only push people to use<br>
data classes more, but also will let them do less mistakes: they know<br>
the danger of parent ordering, but not the ones of decorators ordering.<br>
</blockquote>
<br></span>
3)  - the order of base classes can arranged appropriately<br>
<br>
In our day-to-day work, we use mixins and cooperative multiple inheritance a lot.<br>
So, having dataclasses as a base class or a mixin would be great! :)<br>
<br>
Combined with 1) and 2), I am much in favor of having dataclasses as base class/mixin than as a decorator.<br>
What are the benefits of the decorator? Maybe both is possible?<br>
<br>
Cheers,<br>
Sven<br>
<br>
<br>
PS: @Michel good observation 1). Typing decorators in shell is annoying.<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/steve%40holdenweb.com" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/options/python-dev/steve%<wbr>40holdenweb.com</a><br>
</div></div></blockquote></div><br></div>