logoalt Hacker News

qurrentoday at 12:16 AM2 repliesview on HN

I'm fine with the language. I just hate that you can't do

    import numpy==1.5.4
and the code gets exactly the version it wants.

Replies

pjjpotoday at 12:51 AM

Relatively new, scripts can define dependency metadata now adays to achieve that to some degree. Any pip style versioning including an exact match works there.

https://packaging.python.org/en/latest/specifications/inline...

frollogastontoday at 12:47 AM

The imports/packages situation is terrible in general. This was basically broken until uv, and uv is still not the default.

And it's weird how you import files. They're dot-separated packages that resemble file structure but not exactly. NodeJS has a self-explanatory require("./foo.js") or "../foo.js". The newer JS `import` syntax is annoyingly different from `require` but not terrible.