Skip to content

Commit c97e7a9

Browse files
author
Jeroen van der Heijden
committed
Update sample
1 parent 866b223 commit c97e7a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sample_lego.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ async def example():
6262
print('Is Color', isinstance(Color.GREEN, Color))
6363
print('Is True', Color.GREEN == Color("#0f0"))
6464
print('Is True', Color.GREEN == Color["GREEN"])
65+
print('Is True', getattr(Color, 'GREEN') == Color["GREEN"])
66+
print('Is True', Color.RED.value == lego.bricks[0].color.value)
67+
print('Is True', Color.RED.value == lego.bricks[0].color._value)
6568

6669
brick = lego.bricks[0]
6770
await brick.emit('new-color', 'RED')

0 commit comments

Comments
 (0)