Commit ed5cccba authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

python: fix to_parity default option handling

* python/spot/__init__.py (to_options): Do not have options
explicitely default to to_parity_options(), because that would be
instantiated only once.
parent fd0d752b
Pipeline #18182 passed with stages
in 153 minutes and 50 seconds
......@@ -1292,7 +1292,7 @@ class scc_and_mark_filter:
self.restore_acceptance()
def to_parity(aut, options = to_parity_options(), **kwargs):
def to_parity(aut, options = None, **kwargs):
"""Convert aut into a parity acceptance.
This procedure combines multiple strategies to attempt to
......@@ -1306,6 +1306,10 @@ def to_parity(aut, options = to_parity_options(), **kwargs):
Note that if you pass both your own options object and kwargs,
options will be updated in place.
"""
if options is None:
# Can't make this a default option, otherwise the default
# instance would be updated by the kwargs.
options = to_parity_options()
if kwargs:
for key,val in to_parity_options.__dict__.items():
if not key.startswith('_') and key != "thisown" and key in kwargs:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment