[Python-ideas] namedtuple literals [Was: RE a new namedtuple]

Markus Meskanen markusmeskanen at gmail.com
Thu Jul 27 18:00:28 EDT 2017

> But you'd need to decide whether you

want attributes (spam.x, spam.y) or items (spam["x"], spam["y"]). Both
would be useful at different times.


If something like this was ever added, it'd probably be items, then you
could implement a custom __unpack__ (or whatever name it'd be) method that
would return a dict.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170728/fda86b7c/attachment.html>

More information about the Python-ideas mailing list