1
0
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:
Jan Decaluwe 2010-07-03 19:09:40 +02:00
parent 62ace46b26
commit f44fcfebc3

View File

@ -451,6 +451,9 @@ class _Signal(object):
def __hex__(self):
return hex(self._val)
def __index__(self):
return int(self._val)
# comparison