Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __mul__(self, other):
if isinstance(other, Class):
raise SyntaxError('A Class variable cannot be a descendent of a Var')
return super().__mul__(other)
def as_class(*args, **kwargs):
return Class(*args, **kwargs)
def classes(*args, labels: list = []):
label_kwargs = build_kwargs('label', labels, len(args))
return [Class(args[i], **label_kwargs[i]) for i in range(len(args))]