Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
barumrho
on Jan 6, 2015
|
parent
|
context
|
favorite
| on:
Type hinting for Python
I'm curious how this is valid Python:
def fib(n: int) -> Iterator[int]: - Colon inside argument list - Arrow and type
What are they used for normally?
icebraining
on Jan 6, 2015
[–]
They're generic Function Annotations:
https://www.python.org/dev/peps/pep-3107/
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: