[Python-ideas] Fix that broken callable builtin

Paul Moore p.f.moore at gmail.com
Sun Apr 19 14:44:51 CEST 2015


On 19 April 2015 at 12:57, Ionel Cristian Mărieș <contact at ionelmc.ro> wrote:
>> so the fact that callable() doesn't run arbitrary code is relevant to me.
>
>
> _PyObject_HasAttrId(x, &PyId___call__) wouldn't actually do the call. What
> did you meant to say?

Wouldn't it run the get method of the descriptor? I thought that was
the point of the change? That was the "arbitrary code" I was referring
to (obviously it's well-known code for properties, but for a
user-defined descriptor it could be anything).

Paul


More information about the Python-ideas mailing list