File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -261,14 +261,16 @@ valid. They can use local names or the fully qualified name. Example::
261
261
262
262
def method(self) -> D.field2: # this FAILS, class D is local to C
263
263
... # and is therefore only available
264
- # as C.D.
264
+ # as C.D. This was already true
265
+ # before the PEP.
265
266
266
267
def method(self) -> field2: # this is OK
267
268
...
268
269
269
- def method(self) -> field: # this FAILS, class D doesn't
270
- ... # see C's attributes. This was
271
- # already true before this PEP.
270
+ def method(self) -> field: # this FAILS, field is local to C and
271
+ # is therefore not visible to D unless
272
+ # accessed as C.field. This was already
273
+ # true before the PEP.
272
274
273
275
In the presence of an annotation that isn't a syntactically valid
274
276
expression, SyntaxError is raised at compile time. However, since names
You can’t perform that action at this time.
0 commit comments