pythonanywhere / help_pages

The help pages for help.pythonanywhere.com
43 stars 86 forks source link

Changes to reflect python 3.4 changes to __file__ #82

Closed TheBereaved closed 1 year ago

TheBereaved commented 3 years 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

gpjt commented 3 years ago

Hmm, the exception for __main__.__file__ concerns me a bit -- I can easily imagine that that could trip people up in this case.