[Python-ideas] namedtuple literals [Was: RE a new namedtuple]
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...
More information about the Python-ideas