Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> but programmers using the language don't necessarily use these terms.

this always annoyed me about the python type annotations, you are supposed to already know what contravariant / covariant / invariant means, like: `typing.TypeVar(name, covariant=False, contravariant=False, infer_variance=False)`

Its used in documentation and error messages too:

> the SendType of Generator behaves contravariantly, not covariantly or invariantly.

https://docs.python.org/3/library/typing.html#annotating-gen...



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: