mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-26 10:16:14 +00:00
Fix an error after refactoring.
Avoid using default values for function arguments that use shallow copy.
This commit is contained in:
parent
7f4749a4d6
commit
61915876c5
@ -108,13 +108,16 @@ class Hypothesis:
|
||||
|
||||
|
||||
class HypothesisList(object):
|
||||
def __init__(self, data: Optional[Dict[str, Hypothesis]] = {}):
|
||||
def __init__(self, data: Optional[Dict[str, Hypothesis]] = None):
|
||||
"""
|
||||
Args:
|
||||
data:
|
||||
A dict of Hypotheses. Its key is its `value.key`.
|
||||
"""
|
||||
self._data = data
|
||||
if data is None:
|
||||
self._data = {}
|
||||
else:
|
||||
self._data = data
|
||||
|
||||
@property
|
||||
def data(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user