Ancestors

Toot

Written by Nicolas Évrard on 2024-10-02 at 14:41

The walrus operator in #python allows for some nasty code sometimes.

>>> def toto():
...  return dict(a=1, b=2)
... 
>>> for x in (c := toto()).keys():
...  print(x)
... 
a
b
>>> c
{'a': 1, 'b': 2}

=> More informations about this toot | More toots from nicoe

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113238350983207920
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
235.499294 milliseconds
Gemini-to-HTML Time
0.259445 milliseconds

This content has been proxied by September (3851b).