Steven D'Aprano schrieb:
> On Tue, 16 Dec 2008 17:59:30 +0100, Johannes Bauer wrote:
>
>> Hello group,
>>
>> is there anything like a frozen dict in Python3, so I could do a
>>
>> foo = { FrozenDict({"a" : "b"}): 3 }
>>
>> or something like that?
>
>
> If *all* you want is to use it as a key, then:
>
> tuple(sorted(some_dict.items))
>
> may do the job.
Well, I'd like to access it like a dict afterwards, e.g.
for (i, j) in foo.items():
print(i["a"])
Regards,
Johannes
--
"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
-- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
<[email protected]>
--
http://mail.python.org/mailman/listinfo/python-list