On 3 November 2016 at 11:38, Steven D'Aprano <st...@pearwood.info> wrote:
> Looking at those examples of code, I don't think it is likely that the
> majority (or even a large minority) are the result of getattr.
>
> But even if they are, what difference does it make?

It may have mattered, if a getattr(obj, attr, coalesce=true) function
would provide the same effect with no syntax change. That approach was
suggested earlier in the thread, and met with a lukewarm response, but
if it had turned out to actually address the majority of use cases,
that would be a point in its favour.

It's a relatively minor point, but a valid one.

Paul
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to