Skip to content

Commit bac6774

Browse files
hauntsaninjacarljm
andauthored
Update docs/spec/annotations.rst
Co-authored-by: Carl Meyer <[email protected]>
1 parent 46a3046 commit bac6774

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/spec/annotations.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ Annotating instance and class methods
352352
In most cases the first argument of instance and class methods
353353
(conventionally named ``self`` or ``cls``) does not need to be annotated.
354354

355-
If the argument is not annotated, then for instance methods it is
356-
assumed to have the type of the containing class or :ref:`Self
357-
<self>`, and for class methods the type object type corresponding to
358-
the containing class object or ``type[Self]``.
355+
If the argument is not annotated, then for instance methods it may be
356+
inferred to have either the type of the containing class, or the type :ref:`Self
357+
<self>`. For class methods it may be inferred to have either the type object
358+
type corresponding to the containing class object, or ``type[Self]``.
359359

360360
In addition, the first argument in an instance method can be annotated
361361
with a type variable. In this case the return type may use the same

0 commit comments

Comments
 (0)