In this question - What's the difference between io.open() and os.open() on Python? - I learned that Python open()
function is an alias to the io.open()
function.
My question is how do I find out if one Python function aliases another one?
I thought id()
function will help me out but in the case of open()
and io.open()
it returns different values:
>>> import io
>>> id(open)
140172515129392
>>> id(io.open)
28340168
I'm using Python 2.7.3