fhdl: fix list references (thanks Lars)

This commit is contained in:
Sebastien Bourdeauducq 2011-12-11 20:17:29 +01:00
parent 16a6029a1b
commit dafef5d744
1 changed files with 6 additions and 2 deletions

View File

@ -147,7 +147,8 @@ class Assign:
self.r = _cst(r) self.r = _cst(r)
class StatementList: class StatementList:
def __init__(self, l=[]): def __init__(self, l=None):
if l is None: l = []
self.l = l self.l = l
def _sl(x): def _sl(x):
@ -194,7 +195,10 @@ class Instance:
return id(self) return id(self)
class Fragment: class Fragment:
def __init__(self, comb=[], sync=[], instances=[], pads=set()): def __init__(self, comb=None, sync=None, instances=None, pads=set()):
if comb is None: comb = []
if sync is None: sync = []
if instances is None: instances = []
self.comb = _sl(comb) self.comb = _sl(comb)
self.sync = _sl(sync) self.sync = _sl(sync)
self.instances = instances self.instances = instances