[Python-ideas] Immutable dictionaries
asen.bozhilov at gmail.com
Wed Nov 29 12:30:54 EST 2017
I'm lucky that I could move forward to Python.
What I miss in Python are immutable dictionaries. They are especially
useful for configurations and call functions which expect dictionary as
argument. In my opinion they would let a place for underlying
I'd like to propose also literaling syntax for immutable dictionaries.
immutable_dict = (
'key1' : 'value1',
'key2' : 'value2'
This syntax is not ambiguous with expression statements and tuple literals,
but it requires a bit lookahed during the parsing.
I would appreciate your opinions on the topic. Most interesting for me is
why they are not already part of the language?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas