hdl.rec: make Record(name=) keyword-only.
authorStaf Verhaegen <staf@stafverhaegen.be>
Sat, 9 Nov 2019 16:10:36 +0000 (17:10 +0100)
committerwhitequark <cz@m-labs.hk>
Sat, 9 Nov 2019 16:10:36 +0000 (16:10 +0000)
Everywhere else, the name argument is already keyword-only, so
change it here too for consistency.

nmigen/hdl/rec.py

index d6c46868ccc949e853dc251b6d634e02343a3300..58e1e85581d9c561864c2de2648a86e6c1439140 100644 (file)
@@ -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)