logoalt Hacker News

ActorNightlylast Wednesday at 5:34 PM1 replyview on HN

Lol what.

Python lets you dynamically import from anywhere. The syntax is a bit funky, but thats what llms are for.


Replies

IshKebablast Wednesday at 7:43 PM

No it doesn't. You can't do something like `import ../../foo/bar`. You can mess around with PYTHONPATH and importlib to work around that but that's a horrible hack that also breaks all tooling. Not a good idea.

With Deno you can just import by relative file path and it just works like you'd expect and the tools support it. I wish more languages worked like that.

show 2 replies