mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
Use signals directly for indexing with __index__
This commit is contained in:
parent
62ace46b26
commit
f44fcfebc3
@ -451,6 +451,9 @@ class _Signal(object):
|
||||
|
||||
def __hex__(self):
|
||||
return hex(self._val)
|
||||
|
||||
def __index__(self):
|
||||
return int(self._val)
|
||||
|
||||
|
||||
# comparison
|
||||
|
Loading…
x
Reference in New Issue
Block a user