mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-24 19:04:02 +08:00
language: fix PYONValue list defaults (fixes #682)
This commit is contained in:
parent
483a897db4
commit
e8c5cb55cb
@ -48,6 +48,12 @@ class _SimpleArgProcessor:
|
||||
|
||||
class PYONValue(_SimpleArgProcessor):
|
||||
"""An argument that can be any PYON-serializable value."""
|
||||
def __init__(self, default=NoDefault):
|
||||
# Override the _SimpleArgProcessor init, as list defaults are valid
|
||||
# PYON values
|
||||
if default is not NoDefault:
|
||||
self.default_value = default
|
||||
|
||||
def process(self, x):
|
||||
return pyon.decode(x)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user