
June 17, 2022
4:08 p.m.
Chris Angelico writes:
but at very least, if it isn't *obvious*, it should at least be *unsurprising* if you then get UnboundLocalError.
+1 I think this (== "obvious in hindsight") is probably a better criterion than "obvious" (from the definition) when an error *will* be raised. (That's as a general principle. Ie, it doesn't need to be obvious that you will *get* feedback from the system when you do something, but it should be obvious what the feedback means when you *do* get it.) Steve