19 Apr
2015
19 Apr
'15
3:51 p.m.
On 04/19, Ionel Cristian Mărieș wrote:
On Sun, Apr 19, 2015 at 1:14 PM, Paul Moore <p.f.moore@gmail.com> 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?
The __get__ method of the descriptor, whether of 'property' or something home-grown, is the "arbitrary code", and could conceivably be quite complex and/or slow -- especially if it has to hit the network to determine whether a proxy object is callable. -- ~Ethan~