xref: /Universal-ctags/Units/parser-python.r/python3-function-annotations.d/input.py (revision 60db69f094fa2c9c1647443b6a2b589e7c9bceb0)
1
2def func01() -> "returns something":
3    def sub01(): pass
4
5def func02() -> 2 * 2 * 3 * 4:
6    def sub02(): pass
7
8def func03(a:"hello", b : 1 * 2 + 3 / 4 = 5):
9    def sub03(): pass
10
11def func04(a:(1, 2, 3, 4)=(1, 2, 3, 4), b:[5,6]=[7,8], c=0) -> {'foo' : 'bar' }:
12    def sub04(): pass
13
14
15# test
16for f in (
17func01,
18func02,
19func03,
20func04,
21):
22    print(f.__name__, f.__annotations__)
23