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
reStructuredText, epytext and python3 annotations can define expected types in Python code, and are supported by various integrated development environments such as pycharm. This is particularly handy for defining class names, as it allows autocomplete of members.
A simple example in epytext:
def x_intercept(m, b):
"""
Return the x intercept of the line M{y=m*x+b}. The X{x intercept}
of a line is the point at which it crosses the x axis (M{y=0}).
@type m: float
@param m: The slope of the line.
@type b: number
@param b: The y intercept of the line. The X{y intercept} of a
line is the point at which it crosses the y axis (M{x=0}).
@rtype: number
@return: the x intercept of the line M{y=m*x+b}.
"""
return -b/m