added package structure

This commit is contained in:
2021-09-08 14:04:00 +02:00
parent 583f618016
commit f8cd002cb0
8 changed files with 8 additions and 4 deletions

25
bstrd/bsvar.py Normal file
View File

@ -0,0 +1,25 @@
class BSVar:
def __init__(self, name, cache):
self.name = name
self.cache = cache
def get(self):
return self.cache.data.get(self.name)
value = property(get)
def __repr__(self):
return f"{self.name} = {self.value}"
def __iter__(self):
return self
def __next__(self):
next(self.cache)
return self.get()