def __init__(self, name, type, **kwargs):
self.name = name<EOL>if not isinstance(name, basestring):<EOL><INDENT>raise AttributeError("<STR_LIT>")<EOL><DEDENT>if kwargs.get("<STR_LIT>") and kwargs.get("<STR_LIT>"):<EOL><INDENT>raise AttributeError("<STR_LIT>")  <EOL><DEDENT>self.type = type or NUMBER<EOL>self.min = None<EOL>self.max = None<EOL>self.step = None or kwargs.get("<STR_LIT>")<EOL>self.steps = kwargs.get("<STR_LIT>", DEFAULT_STEPS)<EOL>if self.type == NUMBER:<EOL><INDENT>self.min = kwargs.get("<STR_LIT>", <NUM_LIT:0.0>)<EOL>self.max = kwargs.get("<STR_LIT>", <NUM_LIT>)<EOL>if self.step is None:<EOL><INDENT>diff = max(self.min, self.max) - min(self.min, self.max)<EOL>self.step = (diff / float(self.steps))<EOL><DEDENT>self.default = kwargs.get("<STR_LIT:default>")<EOL>if self.default is None:<EOL><INDENT>self.default = self.min<EOL><DEDENT><DEDENT>elif self.type == TEXT:<EOL><INDENT>self.default = kwargs.get("<STR_LIT:default>", "<STR_LIT>")<EOL><DEDENT>elif self.type == BOOLEAN:<EOL><INDENT>self.default = kwargs.get("<STR_LIT:default>", True)<EOL><DEDENT>elif self.type == BUTTON:<EOL><INDENT>self.default = kwargs.get("<STR_LIT:default>", self.name)<EOL><DEDENT>else:<EOL><INDENT>raise AttributeError("<STR_LIT>")<EOL><DEDENT>self.value = kwargs.get("<STR_LIT:value>", self.default)<EOL>if self.value is None and self.default is not None:<EOL><INDENT>self.value = self.default<EOL><DEDENT>
:param name:     Name of variable
:param type:     NUMBER | TEXT | BOOLEAN | BUTTON
:param default:  default value
:param min:      min value if number
:param max:      max value if number
:param value:    value
:param step:     step between values - cannot specify at same time as step
:param steps:    total steps
:return: