New submission from David Hariri <david.har...@gmail.com>:

In some languages, one may declare a dictionary's key and its value like so:

```
foo = "bar"

my_dict = { foo }
>> { "foo" : "bar" }
```

In Python, one must instead write:

```
foo = "bar"

my_dict = {
    "foo": foo
}
>> { "foo" : "bar" }
```

I humbly suggest this change as a QoL improvement for those who work with 
dictionaries all day.

----------
messages: 394027
nosy: davidhariri
priority: normal
severity: normal
status: open
title: Dictionary assignment shorthand
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44190>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to