-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersmsui
Milestone
Description
Default argument values are evaluated only once, at function definition. Consequently, any modification to that value will affect all subsequent calls.
def set_draw_airports(self, value, port_type=["small_airport"], reload=True):
def set_draw_airspaces(self, value, airspaces=[], range_km=None, reload=True):
def draw_airspaces(self, countries=[], range_km=None):
a solution is to define it None and set the value because it is None.
e.g.
def set_draw_airports(self, value, port_type=None, reload=True):
if port_type is None:
port_type=["small_airport"]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersmsui