3 ms·
> intention behind them was to contribute to readability This is provably wrong. See https://peps.python.org/pep-3107/#use-cases https://peps.python.org/pep-31
by IshKebab 2y ago
> intention behind them was to contribute to readability
This is provably wrong. See https://peps.python.org/pep-3107/#use-cases https://peps.python.org/pep-3107/#use-cases
- hbrn 2y agoHave you read the whole section? > Documentation for parameters and return values ([23]) > Let IDEs show what types a function expects and returns ([16]) > For example, one library might use string-based annotations to provide improved help messages, like so: def compile(source: "something compilable", filename: "where the compilable thing comes from", mode: "is this a single statement or a suite?"):