Aktuelle Änderungen Printable View Änderungen Bearbeiten
PyChart > PyDev > Eclipse > PyGames > PyQuotes > PyWin > PythonWindowsProgramming > PyWin32 > PythonWindowsProgramming > Python > PythonSprache > PythonDoctest > PythonEggs > PythonEvangelism > PythonExecutables > PythonExif > PythonFunctionAnnotationsClear Trail
def haul(item: Haulable, *vargs: PackAnimal) -> Distance:
...
for simple type-based dispatch, an inline way of specifying type or interface would be quite nice for generic functions.[1]
@overload(int, str)
def foo(bar, baz):
...
@overload
def foo(bar: int, baz: str)
...
In other words, what I'm saying is that declarations could be a purely syntactic/metadata feature, and they'd still be quite useful for many things.