New ask Hacker News story: Ask HN: Why Python relative import is so fundamentally broken?
Ask HN: Why Python relative import is so fundamentally broken?
2 by akasakahakada | 2 comments on Hacker News.
Seems that relative import is implemented as relative to where the python.exe executed instead of the place where the file is. So the nature is depending on where you run the doctest or where you put your jupyter notebook, all imports inside the project will break!
2 by akasakahakada | 2 comments on Hacker News.
Seems that relative import is implemented as relative to where the python.exe executed instead of the place where the file is. So the nature is depending on where you run the doctest or where you put your jupyter notebook, all imports inside the project will break!
Comments
Post a Comment