diff --git a/docs/source/cheat_sheet_py3.rst b/docs/source/cheat_sheet_py3.rst index 24621537cf62..9533484e938b 100644 --- a/docs/source/cheat_sheet_py3.rst +++ b/docs/source/cheat_sheet_py3.rst @@ -103,10 +103,10 @@ Functions def show(value: str, excitement: int = 10) -> None: print(value + "!" * excitement) - # Note that arguments without a type are dynamically typed (treated as Any) - # and that functions without any annotations not checked - def untyped(x): - x.anything() + 1 + "string" # no errors + # Note that arguments without a type are dynamically typed (treated as Any) + # and that functions without any annotations not checked + def untyped(x): + x.anything() + 1 + "string" # no errors # This is how you annotate a callable (function) value x: Callable[[int, float], float] = f