top | item 45435234

(no title)

Narushia | 5 months ago

I think they can get away with the "close enough" solutions since Python's type annotations don't have any runtime contracts by default. Might be off-putting to people who are more familiar with statically typed languages (though not always, in my experience).

discuss

order

lexicality|5 months ago

I would buy that argument more if Typescript didn't exist.

You can live with the "close enough" if you're writing a brand new greenfield project and you prevent anyone from ever checking in code mypy doesn't like and also don't use any libraries that mypy doesn't like (and also don't make web requests to APIs that return dictionary data that mypy doesn't like)

Retrofitting an existing project however is like eating glass.