The three-argument form of type() skips the metaclass __prepare__
method, which is called by the class statement machinery rather than
by the metaclass call itself. Say so in the type() entry and point to
types.new_class() for dynamic class creation with the appropriate
metaclass, as directed in the issue thread.
in the same way that keywords in a class
definition (besides *metaclass*) would.
+ Unlike a :keyword:`class` statement, the three argument form does not
+ call the metaclass ``__prepare__`` method (see :ref:`prepare`). Use
+ :func:`types.new_class` to dynamically create a class using the
+ appropriate metaclass.
+
See also :ref:`class-customization`.
.. versionchanged:: 3.6