On Sat, May 16, 2020 at 10:07 PM Eric V. Smith <e...@trueblade.com> wrote:

> But my question is: If this technique has been available for 12 years,
> why is it not more popular?
>

Because linters will not recognise a third party solution. Personally I've
written code like:

```
def __init__(self, **kwargs):
    self.__dict__.update(kwargs)
```

and regretted it later when my IDE didn't know about any of the attributes.

This particular proposal is not necessarily the best solution to this
problem. Steven's parameters() function or a shortcut for keyword arguments
with the same name would also help. But it needs to be something standard
within Python. This solution doesn't require any new language features,
which might mean it has a better chance than other proposals.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/CO4MMDU4BFTZ275VYQOV6SPNLMUUFV37/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to