Closed TheBereaved closed 1 year ago
As of python 3.4, __file__ magic method returns an absolute path by default, with the exception of __main__.__file__. See: https://docs.python.org/3.4/whatsnew/3.4.html#other-language-changes
__file__
__main__.__file__
Hmm, the exception for __main__.__file__ concerns me a bit -- I can easily imagine that that could trip people up in this case.
As of python 3.4,
__file__
magic method returns an absolute path by default, with the exception of__main__.__file__
. See: https://docs.python.org/3.4/whatsnew/3.4.html#other-language-changes