Reputation: 1027
On this code:
def plot(div_name = "", series , options = {} )
I'm getting a syntax error:
unexpected '=', expecting ')' (SyntaxError).
Why is that? Assigning a default value to series solves the problem.
Upvotes: 2
Views: 215
Reputation: 370435
You're not allowed to have optional arguments followed by non-optional arguments followed by further optional arguments. If that were allowed, it would be ambiguous whether plot(foo, bar)
should be plot(foo, bar, {})
or plot("", foo, bar)
.
Upvotes: 5