2 # vim: set fileencoding=utf8
12 def __init__(self
, name
, direction
, type):
14 assert direction
in [IN
, OUT
, INOUT
], \
15 "Port direction %s is invalid" % (direction
,)
17 self
.direction
= direction
21 return "<Port: %s, %s, %s>" % (self
.name
, self
.direction
, self
.type)
23 if __name__
== "__main__":
24 a
= Port("a", IN
, None)
25 b
= Port("b", IN
, None)
26 c
= Port("c", OUT
, None)