typing.NamedTuple doesn't support using a metaclass, or multiple inheritance with classes having metaclasses (such as abc.ABC(Meta)), because NamedTuple uses an undocumented metaclass underhand.
That limitation is not documented.
Since NamedTuple is a function and not a real instance of that metaclass, it's impossible to make your own subclass of both `type(NamedTuple)` (which is really `function`) and `abc.ABCMeta` in my case.

It is possible to use collections.namedtuple instead, but the syntax is obviously not as good and involves repetitions, names being put under quotes, and so on.

Using the undocumented `typing.NamedTupleMeta` metaclass, it is possible to solve the issue. So, I think the NamedTupleMeta should be documented for that use case.

One difference with ABC/ABCMeta is that using ABCMeta _replaces_ the use of ABC, whereas you apparently still need to have NamedTuple as a "base class" (even though it's not a class) when using NamedTupleMeta or a submetaclass.
I think this specificity should be explained (and possibly lifted at a later time if relevant), but that it's not blocking the feature from being relied upon and documented.

See https://discuss.python.org/t/abstract-base-namedtuple/54522
No previous discussion of that metaclass has been found on the Discourse, and it seems small enough not to be opened there.
Document typing.NamedTupleMeta
This is a GitHub Issue
repo:cpython
owner:python
Title : Document typing.NamedTupleMeta
Issue date:

--- start body ---
typing.NamedTuple doesn't support using a metaclass, or multiple inheritance with classes having metaclasses (such as abc.ABC(Meta)), because NamedTuple uses an undocumented metaclass underhand.
That limitation is not documented.
Since NamedTuple is a function and not a real instance of that metaclass, it's impossible to make your own subclass of both `type(NamedTuple)` (which is really `function`) and `abc.ABCMeta` in my case.

It is possible to use collections.namedtuple instead, but the syntax is obviously not as good and involves repetitions, names being put under quotes, and so on.

Using the undocumented `typing.NamedTupleMeta` metaclass, it is possible to solve the issue. So, I think the NamedTupleMeta should be documented for that use case.

One difference with ABC/ABCMeta is that using ABCMeta _replaces_ the use of ABC, whereas you apparently still need to have NamedTuple as a "base class" (even though it's not a class) when using NamedTupleMeta or a submetaclass.
I think this specificity should be explained (and possibly lifted at a later time if relevant), but that it's not blocking the feature from being relied upon and documented.

See https://discuss.python.org/t/abstract-base-namedtuple/54522
No previous discussion of that metaclass has been found on the Discourse, and it seems small enough not to be opened there.
--- end body ---
