A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-March/117409.html below:

[Python-Dev] Non-string keys in type dict

[Python-Dev] Non-string keys in type dict [Python-Dev] Non-string keys in type dictVictor Stinner victor.stinner at gmail.com
Thu Mar 8 02:39:40 CET 2012
Hi,

During the Language Summit 2011 (*), it was discussed that PyPy and
Jython don't support non-string key in type dict. An issue was open to
emit a warning on such dict, but the patch has not been commited yet.

I'm trying to Lib/test/crashers/losing_mro_ref.py: I wrote a patch
fixing the specific issue (keep a strong reference to the MRO during
the lookup, see #14199), but I realized that the real problem is that
we allow custom objects in the type dict.

So my question is: what is the use case of such dict? Why do we still
support it? Can't we simply raise an error if the dict contains
non-string keys?

(*) http://blog.python.org/2011/03/2011-language-summit-report.html

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4