I am searching through method/class declarations in Pycharm and I made it down to __builtin__.py, but there does not appear to be any code written in this module.
Here is the snippet that I came across:
def hasattr(p_object, name): # real signature unknown; restored from __doc__
"""
hasattr(object, name) -> bool
Return whether the object has an attribute with the given name.
(This is done by calling getattr(object, name) and catching exceptions.)
"""
return False
Where is the code that is actually executed when I call hasattr()
? Is the line # real signature unknown; restored from __doc__
a clue as to why there is no code here?
I am not interested in changing anything. I am simply surprised that there is no code written here.