After the separation of unicode and bytestrings in Python 3, I'm surprised that os.path.exists (and friends) accepts both b"/etc" and "/etc"
Related Posts
"After I linked difftastic, one of my friends immediately used difftastic to find a stealthy bug, five stars!"
https://www.scannedinavian.com/tools-built-on-tree-sitters-concrete-syntax-trees.html
@tristanC That's an option! There's often cases where you know what the user wanted though, so you can provide a sensible AST that the toolchain can handle.
For example, a malformed string literal can still be parsed a string so type checking etc can be helpful.
When writing long-lived programs (daemons etc) in Rust, I find myself asking *where* I should put data.
In a GC'd language it's just "I have a string" but Rust forces me to find somewhere to put it.
You do get a performance benefit for this work though.