From b061dc21b353a4ae0a4574e744a6b20cfa1926f5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 20 Jun 2020 13:17:36 +0100 Subject: [PATCH] avoid looking like a singleton pattern --- nmigen_soc/wishbone/sram.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nmigen_soc/wishbone/sram.py b/nmigen_soc/wishbone/sram.py index 451f948..630b53c 100644 --- a/nmigen_soc/wishbone/sram.py +++ b/nmigen_soc/wishbone/sram.py @@ -46,7 +46,9 @@ class SRAM(Elaboratable): """ def __init__(self, memory, read_only=False, bus=None, - granularity=None, features=frozenset()): + granularity=None, features=None): + if features is None: + features = frozenset() if not isinstance(memory, Memory): raise TypeError("Memory {!r} is not a Memory" .format(memory)) -- 2.30.2