STINNER Victor <vstin...@python.org> added the comment:

Moreover, all static types get the Py_TPFLAGS_IMMUTABLETYPE flag automatically. 
For example, "./python -c pass" initializes 196 immutable static types:

* ArithmeticError
* AssertionError
* AttributeError
* BaseException
* BlockingIOError
* BrokenPipeError
* BufferError
* BytesWarning
* ChildProcessError
* ConnectionAbortedError
* ConnectionError
* ConnectionRefusedError
* ConnectionResetError
* DeprecationWarning
* EOFError
* EncodingMap
* EncodingWarning
* Exception
* FileExistsError
* FileNotFoundError
* FloatingPointError
* FutureWarning
* GeneratorExit
* ImportError
* ImportWarning
* IndentationError
* IndexError
* InterpreterID
* InterruptedError
* IsADirectoryError
* KeyError
* KeyboardInterrupt
* LookupError
* MemoryError
* ModuleNotFoundError
* NameError
* NoneType
* NotADirectoryError
* NotImplementedError
* NotImplementedType
* OSError
* OverflowError
* PendingDeprecationWarning
* PermissionError
* ProcessLookupError
* PyCapsule
* RecursionError
* ReferenceError
* ResourceWarning
* RuntimeError
* RuntimeWarning
* StopAsyncIteration
* StopIteration
* SyntaxError
* SyntaxWarning
* SystemError
* SystemExit
* TabError
* TimeoutError
* Token.MISSING
* TypeError
* UnboundLocalError
* UnicodeDecodeError
* UnicodeEncodeError
* UnicodeError
* UnicodeTranslateError
* UnicodeWarning
* UnraisableHookArgs
* UserWarning
* ValueError
* Warning
* ZeroDivisionError
* _contextvars.Context
* _contextvars.ContextVar
* _contextvars.Token
* _io.BufferedRWPair
* _io.BufferedRandom
* _io.BufferedReader
* _io.BufferedWriter
* _io.BytesIO
* _io.FileIO
* _io.IncrementalNewlineDecoder
* _io.StringIO
* _io.TextIOWrapper
* _io._BufferedIOBase
* _io._BytesIOBuffer
* _io._IOBase
* _io._RawIOBase
* _io._TextIOBase
* _thread._ExceptHookArgs
* anext_awaitable
* async_generator
* async_generator_asend
* async_generator_athrow
* async_generator_wrapped_value
* asyncgen_hooks
* bool
* builtin_function_or_method
* builtin_method
* bytearray
* bytearray_iterator
* bytes
* bytes_iterator
* callable_iterator
* cell
* classmethod
* classmethod_descriptor
* code
* collections.OrderedDict
* complex
* coroutine
* coroutine_wrapper
* dict
* dict_itemiterator
* dict_items
* dict_keyiterator
* dict_keys
* dict_reverseitemiterator
* dict_reversekeyiterator
* dict_reversevalueiterator
* dict_valueiterator
* dict_values
* ellipsis
* enumerate
* fieldnameiterator
* filter
* float
* formatteriterator
* frame
* frozenset
* function
* generator
* getset_descriptor
* hamt
* hamt_array_node
* hamt_bitmap_node
* hamt_collision_node
* instancemethod
* int
* items
* iterator
* keys
* list
* list_iterator
* list_reverseiterator
* longrange_iterator
* managedbuffer
* map
* mappingproxy
* member_descriptor
* memoryview
* method
* method-wrapper
* method_descriptor
* module
* moduledef
* object
* odict_items
* odict_iterator
* odict_keys
* odict_values
* pickle.PickleBuffer
* property
* range
* range_iterator
* reversed
* set
* set_iterator
* signal.struct_siginfo
* slice
* staticmethod
* stderrprinter
* str
* str_iterator
* super
* symtable entry
* sys.flags
* sys.float_info
* sys.hash_info
* sys.int_info
* sys.thread_info
* sys.version_info
* time.struct_time
* traceback
* tuple
* tuple_iterator
* type
* types.GenericAlias
* types.SimpleNamespace
* types.Union
* values
* weakcallableproxy
* weakproxy
* weakref
* wrapper_descriptor
* zip

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43908>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to