▲ | wenc 10 months ago | |||||||
> The logic of type hint is not bad but sadly I think that type hint are making python source code messy and unreadable. Compared to legacy Python, yes. Compared to verbose language like Java, no. Python typing is equal or less verbose than Java (unless you use "var" in Java). | ||||||||
▲ | mcdeltat 10 months ago | parent | next [-] | |||||||
Python people legitimately upset they can't write every function like this now: def func(data, *kwargs): """data: the data. kwargs: other data.""" | ||||||||
| ||||||||
▲ | nayuki 10 months ago | parent | prev [-] | |||||||
Technically, Python typing is more verbose than Java because it uses more tokens. Compare these:
Python uses colons and arrows while Java uses positions to encode where the type should go. |