On 07/17/2017 02:26 PM, 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. It’s also rather unPythonic if > you want to support default arguments when creating namedtuple instances. > Maybe as you say, a lot of the typical use cases for namedtuples could be > addressed by a better builtin, but I fear we’ll end up down the bikeshedding > hole for that.
My aenum library [1] has a metaclass-based NamedTuple that allows for default arguments as well as other goodies (which would probably not make it to the stdlib since they are mostly fluff).
-- ~Ethan~ [1] https://pypi.python.org/pypi/aenum _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com