-
Notifications
You must be signed in to change notification settings - Fork 244
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description of the problem
Python doesn't allow keyword arguments to be repeated. Our current setup does allow for e.g. the following, however:
import pygmt
fig = pygmt.Figure()
fig.basemap(region=[0, 1, 0, 1], B='+tbar', frame='+tfoo')
fig.show(method='external')This example produces
silently overriding the B='+tbar' "repeated" argument. I feel like we should raise a SyntaxError in this case, like what Python does for repeated kwargs. I think this would involve modifying the use_alias() decorator, but I'm not totally sure. This addresses the discussion in #359 (comment). If #262 were implemented, this could be a non-issue.
(I'm not sure if this is a bug or a feature request; I chose bug.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
