Here:
from os.path import exists as foo print foo.__name__
we get: \'exists\'. Why not \'foo\'? Which attribute would
\'exists\'
\'foo\'
The as is syntactical sugar in the file/session of the import, while the __name__ attribute is part of the function object.
as
__name__