circuitpython/tests/bench/var-6.1-instance-attr-5.py

21 lines
261 B
Python
Raw Normal View History

import bench
2021-03-15 09:57:36 -04:00
class Foo:
def __init__(self):
self.num1 = 0
self.num2 = 0
self.num3 = 0
self.num4 = 0
self.num = 20000000
2021-03-15 09:57:36 -04:00
def test(num):
o = Foo()
i = 0
while i < o.num:
i += 1
2021-03-15 09:57:36 -04:00
bench.run(test)