2 ms·
Tangentially, I wish Python's import and packaging syntax were half as good as anything in JS. Figuring out what combination of adjacent files and directory str
by mydriasis 3y ago
Tangentially, I wish Python's import and packaging syntax were half as good as anything in JS. Figuring out what combination of adjacent files and directory structures I need to import anything from anywhere is basically cargo cult madness. I am prepared to be proven wrong by 100 commenters, but imo it's confusing and sucks. I've had such a great experience with importing and packaging in JS -- to the point when I get something wrong, it's because I have Python packaging PTSD and don't reach for the simplest solution, where you literally just feed it a relative path and it _does the thing_. That's all I want, Python. I want to just give you a path and you do the thing. Instead I have to make a slew of random empty files, install this, move that... why Python, why?
- llimllib 3y agoIf it helps any, I feel exactly the same except with environments swapped. I think we're both just used to one thing over the other.
- maxloh 3y agoActually Python done one thing right. The following syntax is better when coding with IDE, from os inport listdir After you typed `from os`, IDE could suggest signature names based on the module you are importing.