[Python-ideas] AtributeError inside __get__

Chris Angelico rosuav at gmail.com
Fri Dec 30 10:10:03 EST 2016


On Sat, Dec 31, 2016 at 1:55 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Rather than changing the descriptor protocol in general, I'd personally be
> more amenable to the idea of *property* catching AttributeError from the
> functions it calls and turning it into RuntimeError (after a suitable
> deprecation period). That way folks that really wanted the old behaviour
> could define their own descriptor that works the same way property does
> today, whereas if the descriptor protocol itself were to change, there's
> very little people could do to work around it if it wasn't what they wanted.
>

Actually, that makes a lot of sense. And since "property" isn't magic
syntax, you could take it sooner:

from somewhere import property

and toy with it that way.

What module would be appropriate, though?

ChrisA


More information about the Python-ideas mailing list