1 | initial version |
How about something like this?
class VariableGenerator(object): def __init__(self, prefix): self.__prefix = prefix
@cached_method
def __getitem__(self, key):
return SR.var("%s%s"%(self.__prefix,key))
a=VariableGenerator('a')
a[0], a[1], a[2] # all variables
2 | No.2 Revision |
How about something like this?
class VariableGenerator(object):
def __init__(self, prefix):
self.__prefix =