wenc 15 hours 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).

2
mcdeltat 11 hours ago

Python people legitimately upset they can't write every function like this now:

def func(data, *kwargs): """data: the data. kwargs: other data."""

FabHK 5 hours ago

# returns the result

nayuki 7 hours ago

Technically, Python typing is more verbose than Java because it uses more tokens. Compare these:

    Python: def foo(x: int, y: int) -> int:  return x + y

    Java: int foo(int x, int y) { return x + y; }
Python uses colons and arrows while Java uses positions to encode where the type should go.