[issue23990] Callable builtin doesn't respect descriptors

Ionel Cristian Mărieș report at bugs.python.org
Mon Apr 20 15:36:08 CEST 2015


Ionel Cristian Mărieș added the comment:

My point was about consistency in descriptor handling, not consistency of
fault (eg: broken everywhere). I don't understand why that's not clear
here.

The big idea here is to harmonize capability checking with descriptor
handling. Justifying breakage in callable with breakage in
collections.Callable serves it no justice.

On Monday, April 20, 2015, R. David Murray <report at bugs.python.org> wrote:

>
> R. David Murray added the comment:
>
> I in case it wasn't clear, I closed this not because of my "case closed"
> statement, but because as Eric pointed out we *do* have consistency here:
> things which check *capabilities* (as opposed to actually *using* the
> special methods), like callable and Iterable, only look for the existence
> of the method, consistently.  The fact that you can then get an
> AttributeError later when actually using the method is unfortunate, but
> there really isn't anything sensible to be done about it, due to backward
> compatibility concerns.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org <javascript:;>>
> <http://bugs.python.org/issue23990>
> _______________________________________
>

-- 

Thanks,
-- Ionel Cristian Mărieș, http://blog.ionelmc.ro

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23990>
_______________________________________


More information about the Python-bugs-list mailing list