4 ms·
Python introduced the 'typing' module in the standard library in 3.5, and declared that henceforth the annotation syntax was for type hints. Python introduced
by ubernostrum 8y ago
Python introduced the 'typing' module in the standard library in 3.5, and declared that henceforth the annotation syntax was for type hints.
Python introduced the annotation syntax (for everything except variables/attributes) in 3.0. The annotation syntax for variables/attributes was introduced in 3.6.