__name__is not an attribute of a class int(or any of its base classes):
>>> int.__dict__['__name__']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: '__name__'
>>> int.__mro__
(<class 'int'>, <class 'object'>)
>>> object.__dict__['__name__']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: '__name__'
, type ( descriptor, int int):
>>> type(int)
<type 'type'>
>>> type.__dict__['__name__']
<attribute '__name__' of 'type' objects>
>>> type.__dict__['__name__'].__get__(int)
'int'
, , .
.