From: Staf Verhaegen Date: Sat, 9 Nov 2019 16:10:36 +0000 (+0100) Subject: hdl.rec: make Record(name=) keyword-only. X-Git-Tag: v0.1~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dc2a09b8b9b60a219be2cb97b5ccce7d2a1a7700;p=nmigen.git hdl.rec: make Record(name=) keyword-only. Everywhere else, the name argument is already keyword-only, so change it here too for consistency. --- diff --git a/nmigen/hdl/rec.py b/nmigen/hdl/rec.py index d6c4686..58e1e85 100644 --- a/nmigen/hdl/rec.py +++ b/nmigen/hdl/rec.py @@ -107,9 +107,9 @@ class Record(Value): fields[field_name] = Signal.like(field, name=concat(new_name, field_name), src_loc_at=1 + src_loc_at) - return cls(other.layout, new_name, fields=fields, src_loc_at=1) + return cls(other.layout, name=new_name, fields=fields, src_loc_at=1) - def __init__(self, layout, name=None, *, fields=None, src_loc_at=0): + def __init__(self, layout, *, name=None, fields=None, src_loc_at=0): if name is None: name = tracer.get_var_name(depth=2 + src_loc_at, default=None)