micropython: add micropython component

This commit is contained in:
KY-zhang-X
2022-09-29 12:10:37 +08:00
parent 1514f1cb9b
commit dd76146324
2679 changed files with 354110 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
class foo(object):
def __init__(self, value):
self.x = value
def __eq__(self, other):
print('eq')
return self.x == other.x
def __lt__(self, other):
print('lt')
return self.x < other.x
def __gt__(self, other):
print('gt')
return self.x > other.x
def __le__(self, other):
print('le')
return self.x <= other.x
def __ge__(self, other):
print('ge')
return self.x >= other.x
for i in range(3):
for j in range(3):
print(foo(i) == foo(j))
print(foo(i) < foo(j))
print(foo(i) > foo(j))
print(foo(i) <= foo(j))
print(foo(i) >= foo(j))