[Python-ideas] Augmented assignment syntax for objects.

Tin Tvrtković tinchester at gmail.com
Sat Apr 29 08:53:26 EDT 2017


On Fri, Apr 28, 2017 at 3:07 PM Nick Coghlan <ncoghlan at gmail.com> wrote:

> Yes, the point I attempted to raise earlier: at the language design
> level, "How do we make __init__ methods easier to write?" is the
> *wrong question* to be asking. It's treating the symptom (writing an
> imperative initialiser is repetitive when it comes to field names)
> rather than the root cause (writing imperative initialisers is still
> part of the baseline recommendation for writing classes, and we don't
> offer any supporting infrastructure for avoiding that directly in the
> standard library) [...]
>


Very well put. I also can't help but hope these efforts lead to Python also
acquiring better tools for dealing with structured data (instances of
classes and enumerations) down the road. Like a Pythonic version of Rust's
match, for example. That would be really something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170429/7030efd2/attachment.html>


More information about the Python-ideas mailing list