Given code like this:

```
d = {1: {2: {3: 4}}}
print(d[1][2][3])
d[1][2][3] = None
print(d)
```

It should be possible to rewrite it using a starred expression, like this:

```
d = {1: {2: {3: 4}}}
keys= 1,2,3
print(d[*keys])
d[*keys] = None
print(d)
```

Hopefully it's clear from that example what I'm suggesting.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/53WTCXKHVWFBYO44KTEKVRPUB6AB63YO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to