You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it possible to declare function signature in a comment. This makes is possible to write statically typed code that is valid Python 2. Here is a trivial example:
def inc(x):
# type: (int) -> int
return x + 1
Also let the type comment included on the same line as the function header:
def inc(x): # type: (int) -> int
return x + 1
Methods should not include a type for the self argument:
Note that this is not good for writing overloaded functions. An alternative syntax, such as using a function decorator, is needed for this (in a separate issue).
The text was updated successfully, but these errors were encountered:
Make it possible to declare function signature in a comment. This makes is possible to write statically typed code that is valid Python 2. Here is a trivial example:
Also let the type comment included on the same line as the function header:
Methods should not include a type for the self argument:
Note that this is not good for writing overloaded functions. An alternative syntax, such as using a function decorator, is needed for this (in a separate issue).
The text was updated successfully, but these errors were encountered: