class ClassWithDict: x = js.Int() d = js.Dict() def __init__(self, x, d): self.x = x self.d = d
class ClassWithList: x = js.Int() lst = js.List() def __init__(self, x, lst): self.x = x self.lst = lst
class OtherSaveable: foo = js.String() bar = js.Int() def __init__(self, foo, bar): self.foo = foo self.bar = bar
class MyClass: x = js.Int() y = js.Float() lst = js.List() def __init__(self, x, lst): self.x = x self.lst = lst
class SimpleClass: a = js.Int() b = js.Float() def __init__(self, a=None, b=None): if a is not None: self.a = a if b is not None: self.b = b
class NoInit: """ A class with saveable attribute, but no __init__ """ x = js.Int() y = js.String()
class NoInit: x = js.Int() y = js.String()