Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10)
- [GCC 4.4.5] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> def foo(x: "First operand", y: "Second operand") -> "Sum of operand squares":
- ... return x * x + y * y
- ...
- >>> foo(3, 4)
- 25
- >>> print(foo.__annotations__)
- {'y': 'Second operand', 'x': 'First operand', 'return': 'Sum of operand squares'}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement