class TestObject(object): inner = vproperty(instance=InnerObject) x = inner.x y = inner.y nix = vproperty(type=int, fdefault=lambda self: 0) niy = vproperty(type=int, fdefault=lambda self: 0)
class Obj(object): p = vproperty() @p.getter def p(self): return self.__dict__.get('_q', 1) @p.setter def p(self, value): self.__dict__['_q'] = value
class Obj2(object): p = vproperty() @p.type def ptype(self, value): return self.ty(value)
class Obj(object): p = vproperty(type=int)
class Obj(object): p = vproperty(instance=int)
class NotPicklable(object): p = vproperty()
class Obj(object): p = vproperty()
class Obj(object): p = vproperty() @p.default def p_default(self): return 12
class Obj(object): p = vproperty(type=int) with self.assertRaises(ValueError): p.delegates_to('x')
class InnerObject(object): x = vproperty(fdefault=lambda self: 99) y = vproperty() nx = vproperty(type=int, fdefault=lambda self: 0)
class Outer(object): def __init__(self, i): self.i = i i = vproperty(instance=Inner) y = i.ii nx = y.nx x = i.ii.x
class Inner(object): def __init__(self, ii): self.ii = ii ii = vproperty(instance=InnerInner) nx = ii.nx x = ii.x
class InnerInner(object): def __init__(self, x): self.x = x x = vproperty() nx = vproperty(fdefault=lambda self:0, type=int)