[Python-ideas] a new namedtuple

Guido van Rossum guido at python.org
Tue Jul 18 12:09:18 EDT 2017


On Tue, Jul 18, 2017 at 8:56 AM, Ethan Furman <ethan at stoneleaf.us> wrote:

> I certainly don't expect the signature to change, but why is using a
> metaclass out?  The use (or not) of a metaclass /is/ an implementation
> detail.
>

It is until you try to subclass with another metaclass -- then you have a
metaclass conflict. If the namedtuple had no metaclass this would not be a
conflict. (This is one reason to love class decorators.)

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170718/2354c329/attachment.html>


More information about the Python-ideas mailing list