bpo-33190: elucidated `types.new_class` docstring by Ricyteach · Pull Request #6317 · python/cpython
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 34.4k
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters