Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1352d08

Browse files
committed
update comments
1 parent fc7f5bb commit 1352d08

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Lib/symtable.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,15 @@ def is_local_symbol(ident):
231231
if is_local_symbol(st.name):
232232
if st.type == _symtable.TYPE_TYPE_PARAM:
233233
# Current 'st' is an annotation scope with one or
234-
# more children (we expect only one, but ,
235-
# so we need to find the corresponding inner function,
236-
# class or type alias.
234+
# more children (we expect only one, but we might
235+
# have more in the future). In particular, we need
236+
# to find the corresponding inner function, class or
237+
# type alias.
237238
st = next((c for c in st.children if c.name == st.name), None)
238239
# if 'st' is None, then the annotation scopes are broken
239240
assert st is not None, 'annotation scopes are broken'
240241

242+
# only select function-like symbols
241243
if st.type == _symtable.TYPE_FUNCTION:
242244
d[st.name] = 1
243245
self.__methods = tuple(d)

0 commit comments

Comments
 (0)