On the list, Daniel Fetchinson wrote:
It looks like type hinting as a feature is applauded by everyone but
the actual syntax/implementation is polarizing. Could we have a
section in the PEP listing all alternative sytax/implementations with
pros and cons? Stuff like:
Stub files
property-style type hinting, e.g.:
@typehints( arg1: int, arg2: str, returns: str )
def func( arg1, arg2 )
return 'hello'
docstrings, e.g.:
def func( arg1, arg2 ):
"""type hints: arg1: int, arg2: str, returns: str"""
return 'hello'
Cobra-inspired type hints, e.g.:
def func( arg1, arg2 ):
requires:
isinstance( arg1, int )
isinstance( arg2, str )
returns:
str
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4