7 ms·
> Looks like people thought "." refers to the filesystem CWD instead of the current package. Yes because referring to the filesystem is logical and intuitive a
by IshKebab 4y ago
> Looks like people thought "." refers to the filesystem CWD instead of the current package.
Yes because referring to the filesystem is logical and intuitive and referring to some abstract "package" that changes depending on how you invoke Python is insane.
> But once you know that, it's straightforward, no?
I wish!
- mixmastamyk 4y agoIt's a programming language, not a shell, of course. It has always been strict about syntax as well. I don't expect "&" or ">" to work the same in the shell as I do in Python—why would I expect "." to? Close to none of the notation of Python works the same as a shell. Even quotes, which are superficially similar but have significant differences. > abstract "package" Packages are not abstract, they are simply a folder with .py files inside. Sounds concrete enough to me. > changes depending on how you invoke Python I'm not sure what this refers to? I know you can change PYTHONPATH. And the current folder portion changes with it.