bpo-33190: elucidated `types.new_class` docstring by Ricyteach · Pull Request #6317 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

Calls to `type` such as `type("C", (Generic[MyTypeVar],), {})` will raise an error directing the person to use `types.new_class` instead. Upon first glance both functions have similar signatures, and this seems to imply they should be used the same. However the 3rd argument for each is completely different. I've tried to clear this up in the docstring.

ilevkivskyi

Labels