[Python-Dev] Impact of Namedtuple on startup time (original) (raw)
Barry Warsaw barry at python.org
Mon Jul 17 20:16:42 EDT 2017
- Previous message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Next message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jul 17, 2017, at 18:27, Greg Ewing <greg.ewing at canterbury.ac.nz> 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
-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Message signed with OpenPGP URL: <http://mail.python.org/pipermail/python-dev/attachments/20170717/78b2e753/attachment.sig>
- Previous message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Next message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]