[Python-ideas] The AttributeError/__getattr__ mechanism
Paul Moore
p.f.moore at gmail.com
Fri Nov 27 13:20:35 EST 2015
On 27 November 2015 at 17:49, 王珺 <wjun77 at gmail.com> wrote:
> I used __getattr__ sometimes, and descriptor especially property is so
> widely used. I wonder whether someone had encountered the same problem with
> me.
>
> However, this is a complicated problem including performance issues, and
> backward compatibility.
I understand the issue you are reporting (and thanks for stripping it
down to a simple example in the issue) but could you give a real world
example of how this might actually be an issue in practice? I don't
believe I've ever heard anyone report this as an issue before, which
implies to me that it's not a particularly common problem in real
code.
I'm not 100% clear on how bad any backward compatibility or
performance issues might be, but it's certainly true that we'd need
real-world use cases to justify the cost of the change.
Paul
More information about the Python-ideas
mailing list