Skip to content

Commit f6a6f94

Browse files
document _funcname_and_argnum
1 parent 92dccc9 commit f6a6f94

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bpython/repl.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,12 +479,11 @@ def get_object(self, name):
479479

480480
@classmethod
481481
def _funcname_and_argnum(cls, line):
482+
"""Parse out the current function name and arg from a line of code."""
482483
# each list in stack:
483484
# [full_expr, function_expr, arg_number, opening]
484-
# empty string in num_commas means we've encountered a kwarg
485-
# so we're done counting
486-
487-
# new plan: do a full parse, then combine things
485+
# arg_number may be a string if we've encountered a keyword
486+
# argument so we're done counting
488487
stack = [['', '', 0, '']]
489488
try:
490489
for (token, value) in PythonLexer().get_tokens(line):

0 commit comments

Comments
 (0)