[issue5945] PyMapping_Check returns 1 for lists

Antoine Pitrou report at bugs.python.org
Thu Jan 6 09:27:53 CET 2011


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

> Rather than introduce "fixes" that break code and hurt performance, I
> think it would be better to deprecate PyMapping_Check() and wait for a
> fast, clean C version of the ABCs (that is supposed to be our one
> obvious way to do it).

Do you also advocate deprecating PySequence_Check()? Both are useful
APIs to know what you're dealing with.

As for the "clean C version of the ABCs", I'm afraid we could wait quite
a bit, since that's a lot more work and nobody seems really interested
in the matter.

> FWIW, the spreadsheet example has been around for years and I know of
> more than one private company that has made heavy use of code modeled
> on that example (not for spreadsheets, but as a hook for eval).  So, I
> don't think the new "keys" check should be backported.

Well, I'm not proposing to backport it, but to fix things in 3.2.

----------

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


More information about the Python-bugs-list mailing list