iteration and collection simplifications
This commit is contained in:
parent
f304217d76
commit
62fc64c344
6 changed files with 12 additions and 12 deletions
|
|
@ -239,7 +239,7 @@ class PortList(metaclass=ABCMeta):
|
|||
if duplicates:
|
||||
raise PortError(f'Unrenamed ports would be overwritten: {duplicates}')
|
||||
|
||||
renamed = {mapping[k]: self.ports.pop(k) for k in mapping.keys()}
|
||||
renamed = {vv: self.ports.pop(kk) for kk, vv in mapping.items()}
|
||||
if None in renamed:
|
||||
del renamed[None]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue