Rather than just KeyError, I wish Python said "No such key 'fooz', did you mean 'foo'?"
Related Posts
I'm pretty impressed with Cursor: I've successfully asked it to perform codebase transforms in English, and it's worked!
E.g. "Replace all calls foo(..., true) with foo_immediate(...) define a foo_immediate function".
I'm still reading the diff and checking tests -- it's still AI after all.
Playing with optional type signatures in Python, I realise that the return type is the most important to me.
I'd much rather have a function with only a return type instead of a function with only parameter types. It's often quick to add too.
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct?
Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position. https://rust-lang.github.io/rfcs/0092-struct-grammar.html