File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -352,10 +352,10 @@ Annotating instance and class methods
352352In 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
360360In addition, the first argument in an instance method can be annotated
361361with a type variable. In this case the return type may use the same
You can’t perform that action at this time.
0 commit comments