Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dependenttypes
· 6y ago · 0 comments
doing simply funname(args): would work fine
Comments
[–]
pansa2
6y ago
How would the parser know that’s a function
definition
and not a function
call
?
[–]
dependenttypes
OP
6y ago
by the :
[–]
pansa2
6y ago
That's too late. The parser needs to know whether it's looking at a definition or a call before that - for example, to know whether to parse "args" as a `parameters` or an `arglist` [0].
[0]
https://docs.python.org/3/reference/grammar.html