From: Luke Kenneth Casson Leighton Date: Sat, 20 Jun 2020 12:17:36 +0000 (+0100) Subject: avoid looking like a singleton pattern X-Git-Tag: 24jan2021_ls180~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b061dc21b353a4ae0a4574e744a6b20cfa1926f5;p=nmigen-soc.git avoid looking like a singleton pattern --- 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))