File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -349,16 +349,15 @@ types cannot be specified::
349349Annotating instance and class methods
350350-------------------------------------
351351
352- In most cases the first argument of class and instance methods
352+ In most cases the first argument of instance and class methods
353353(conventionally named ``self `` or ``cls ``) does not need to be annotated.
354354
355355If the argument is not annotated, then for instance methods it is
356356assumed to have the type of the containing class or :ref: `Self
357357<self>`, and for class methods the type object type corresponding to
358- the containing class object or ``type[Self] ``. For example, in class
359- ``A `` the first argument of an instance method has the implicit type
360- ``A ``. In a class method, the precise type of the first argument
361- cannot be represented using the available type notation.
358+ the containing class object or ``type[Self] ``. In a class method, the
359+ precise type of the first argument cannot be represented using the
360+ available type notation.
362361
363362In addition, the first argument in an instance method can be annotated
364363with 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