4
submitted 2 weeks ago by cypherpunks@lemmy.ml to c/python@lemmy.ml

cross-posted from: https://lemmy.ml/post/21461907

So, this uses a macro, but if you're thinking anything is possible with a macro, it's actually not in Rust. The input does still need to parse as valid Rust tokens.

Which means the authors asked themselves at some point: Is the Rust syntax a superset of the Python syntax?
And well, it's not. In particular, some Python keywords will just be tokenized as an identifier (like a variable name).

But it is close enough that the authors decided against requiring a massive string to be passed in, which does amuse me. ๐Ÿ™ƒ

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 16 Oct 2024
4 points (100.0% liked)

Python

3222 readers
1 users here now

News and discussions about the programming language Python


founded 5 years ago
MODERATORS