nac3/nac3artiq/demo/string_attribute_issue337.py

25 lines
404 B
Python
Raw Permalink Normal View History

from min_artiq import *
from numpy import int32
@nac3
2024-12-27 17:44:11 +08:00
class Demo2:
core: KernelInvariant[Core]
attr1: KernelInvariant[str]
attr2: KernelInvariant[int32]
def __init__(self):
self.core = Core()
self.attr2 = 32
self.attr1 = "SAMPLE"
@kernel
def run(self):
print_int32(self.attr2)
self.attr1
if __name__ == "__main__":
2024-12-27 17:44:11 +08:00
Demo2().run()