[issue5945] PyMapping_Check returns 1 for lists

Antoine Pitrou report at bugs.python.org
Tue Jan 4 11:31:23 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> Right, calling PyMapping_Check() was never particularly reliable, and
> extension modules depending on it probably always had subtle bugs. 

> Perhaps it would be nice if we provided a C API to at least some of
> the ABC package.

In the meantime, would it be reasonable to add the moral equivalent of `hasattr(type(op), 'items')` to PyMapping_Check()?

----------

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


More information about the Python-bugs-list mailing list