I\'m studying Python, after a lot of PHP experience, and it would be handy to have type-hinting in Python. Looks like Eclipse with PyDev doesn\'t support this. Any sug
As of August 2014 there is a proposal by Guido Van Rossum to use mypy syntax annotate type in function definitions, stating that the new syntax is actually valid Python 3. An example from his proposal (not yet a PEP as of September 2014)
from typing import List, Dict
def word_count(input: List[str]) -> Dict[str, int]:
result = {} #type: Dict[str, int]
for line in input:
for word in line.split():
result[word] = result.get(word, 0) + 1
return result