[Python-Dev] Non-string keys in type dict (original) (raw)
Victor Stinner victor.stinner at gmail.com
Thu Mar 8 02:45:07 CET 2012
- Previous message: [Python-Dev] Non-string keys in type dict
- Next message: [Python-Dev] Non-string keys in type dict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
It's the issue #11455. As written in the issue, there are two ways to create such type:
class A(object): locals()[42] = "abc"
or
type("A", (object,), {42: "abc"})
Both look like an ugly hack.
Victor
- Previous message: [Python-Dev] Non-string keys in type dict
- Next message: [Python-Dev] Non-string keys in type dict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]