On Jul 17, 2017, at 18:27, Greg Ewing <[email protected]> wrote: > > Barry Warsaw wrote: >> namedtuple is great and clever, but it’s also a bit clunky. It has a weird >> signature and requires a made up type name. > > Maybe a metaclass could be used to make something > like this possible: > > > class Foo(NamedTuple, fields = 'x,y,z'): > ... > > Then the name is explicit and you get to add methods > etc. if you want.
Yes, I like how that reads. -Barry
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
