News for hackers. Stuff that matters.
Re:How the Python import system works by catlifeonmars on Saturday July 24, 2021 @01:43PM (#27942927)
NodeJS allows this as well. I think this is pretty much a must-have feature for any serious dynamic language.

Edit: A must have for any prolific dynamic language. But now I’m not sure that’s true, because even though it apparently works in Python, it’s certainly not widely used. In NodeJS this feature is used quite heavily for typescript, coffeescript (etcetera) interop.

Re:How the Python import system works by dragonwriter on Saturday July 24, 2021 @02:09PM (#27943147)
> But now I’m not sure that’s true, because even though it apparently works in Python, it’s certainly not widely used.

I mean, it is used—even in the standard library—but often for alternative packaging (e.g., loading python modules in zip files) rather than alternative languages. It may be used less prominently than in Node, but it definitely is used for a variety of things.

Re:How the Python import system works by aasasd on Saturday July 24, 2021 @04:47PM (#27944346)
It's pretty much the exact feature that's behind the saying that ‘to parse Perl you must have the Perl interpreter’. Because Perl allows some kind of language/imports handlers, as exhibited by tricks like Lingua::Romana::Perligata.