x = 5 dir(x)
['__abs__', '__add__', '__and__', '__bool__', ...
Integers, strings, and other class objects defined in C are closed for modification.
>>> x = 5 >>> x.__add__ = lambda x, y: x*y Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'int' object attribute '__add__' is read-only
But that doesn't make a language with closed classes non-OO.
Integers, strings, and other class objects defined in C are closed for modification.
In that sense they are "special" (or class objects defined in Python are special).But that doesn't make a language with closed classes non-OO.