Earlier quoted context omitted.
Yep — I use mixed annotations on my Python code because as the person I’m responding to pointed out, they catch many small type errors. Dataclasses have been awesome. I’m also generally pro-types, but I think it’s worth having a discussion about this type system in the context of Pythonisms. - - - - - If you’re using “any” for most of your types, then it’s not providing value — an untyped statement implicitly has the…
Sure, but the idea behind gradual typing is that 'Any' should only be temporary. IMO if you're serious about it, stable code should at least pass strict type checking, if not completely forbid even explicit Any. >There’s a reason I brought up the JSON example: loading and manipulating JSON of varying structure is something I do a lot at work. Do you have a specific example that you find troublesome? For JSON with a f…
Python types don’t support a common Pythonism used frequently in my work.
In fact, you admit that even fixed JSON can be difficult without a 3rd party library.
You’re lecturing me like I don’t understand types without realizing that you repeated my point about a gap in the current type system.