2017-11-30 2:16 GMT+01:00 Rob Cliffe :
> This is sort of a subset of an idea I once posted on Python-Ideas:
> Dictionaries, sets and lists (etc. ?) could have a mutable flag, and once
> it was set to False you could neither change it back nor change the
> object. (OK there might be some backdoor
On 29/11/2017 17:30, Asen Bozhilov wrote:
This is my first post here. I have strong experience with JavaScript
and 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 dict
David Mertz wrote:
> https://www.python.org/dev/peps/pep-0416/
PEP 351 (also rejected) is related to this.
-Barry
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python
2017-11-29 18:30 GMT+01:00 Asen Bozhilov :
> I'd like to propose also literaling syntax for immutable dictionaries.
>
> immutable_dict = (
> 'key1' : 'value1',
> 'key2' : 'value2'
> )
Since Python 3.3, you can write:
vstinner@apu$ python3
Python 3.6.3 (default, Oct 9 2017, 12:07:10)
>>>
On Wed, Nov 29, 2017, at 12:30, Asen Bozhilov wrote:
> I would appreciate your opinions on the topic. Most interesting for me is
> why they are not already part of the language?
See the rejection notes at https://www.python.org/dev/peps/pep-0416/
___
Pyt
https://www.python.org/dev/peps/pep-0416/
Also: https://pypi.python.org/pypi/frozendict
On Wed, Nov 29, 2017 at 9:30 AM, Asen Bozhilov
wrote:
> This is my first post here. I have strong experience with JavaScript and
> I'm lucky that I could move forward to Python.
> What I miss in Python are i
This is my first post here. I have strong experience with JavaScript and
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 l