nac3/nac3artiq/demo/tests/string_attribute_issue337.py

19 lines
290 B
Python
Raw Normal View History

from min_artiq import *
from numpy import int32
@nac3
class Demo:
2025-01-16 12:42:13 +08:00
attr1: Kernel[str]
attr2: Kernel[int32]
2025-01-16 12:42:13 +08:00
@kernel
def __init__(self):
self.attr2 = 32
self.attr1 = "SAMPLE"
@kernel
def run(self):
print_int32(self.attr2)
self.attr1