Y
Hacker News
new
|
ask
|
show
|
jobs
by
dependenttypes
2135 days ago
doing simply funname(args): would work fine
1 comments
pansa2
2135 days ago
How would the parser know that’s a function
definition
and not a function
call
?
link
dependenttypes
2135 days ago
by the :
link
pansa2
2135 days 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
link