diff --git a/pep-0484.txt b/pep-0484.txt index 267fa2b16..f673a6a78 100644 --- a/pep-0484.txt +++ b/pep-0484.txt @@ -2027,6 +2027,17 @@ Notes: def add(a, b): # type: (int, int) -> int return a + b +- Misplaced type comments will be flagged as errors by a type checker. + If necessary, such comments could be commented twice. For example:: + + def f(): + '''Docstring''' + # type: () -> None # Error! + + def g(): + '''Docstring''' + # # type: () -> None # This is OK + Rejected Alternatives =====================