11 Apr
2018
11 Apr
'18
8:39 a.m.
On Tue, Apr 10, 2018 at 9:50 PM, Eric V. Smith
3. Annotations. They are used mainly by third party tools that statically analyze sources. They are rarely used at runtime.
Even less used than docstrings probably.
typing.NamedTuple and dataclasses use annotations at runtime.
Astropy uses annotations at runtime for optional unit checking on arguments that take dimensionful quantities: http://docs.astropy.org/en/stable/api/astropy.units.quantity_input.html#astr...