|
|
|
|
|
by kketch
257 days ago
|
|
They don’t violate the spirit of the language. They are optional. They don’t change the behaviour at runtime. Type annotations can seem pointless indeed if you are unwilling to learn how to use them properly. Using a giant union to type your (generic) function is indeed silly, you just have to make that function generic as explained in another comment or I guess remove the type hints |
|
That in itself violates the spirit of the language, IMO. “There should be one obvious way to do it”.