Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions docs/spec/annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ instance and class methods (conventionally named ``self`` or ``cls``),
which type checkers should assume to have an appropriate type, as per
:ref:`annotating-methods`.

(Note that the return type of ``__init__`` ought to be annotated with
``-> None``. The reason for this is subtle. If ``__init__`` assumed
a return annotation of ``-> None``, would that mean that an
argument-less, un-annotated ``__init__`` method should still be
type-checked? Rather than leaving this ambiguous or introducing an
exception to the exception, we simply say that ``__init__`` ought to
have a return annotation; the default behavior is thus the same as for
other methods.)

A type checker is expected to check the body of a checked function for
consistency with the given annotations. The annotations may also be
used to check correctness of calls appearing in other checked functions.
Expand Down
Loading