class C(B, A): a = field(default=None) c = field(default_factory=copy_field('b')) @init_fields(ancestor_fields_first=a_first) def __init__(self): pass
class C(object): y = field() x = field(default_factory=copy_field(y)) @init_fields def __init__(self): pass
class Foo(object): a = field(default_factory=copy_value([])) b = field(default_factory=copy_field('z')) c = field() @c.default_factory def c_default(self): return self.a + ['yes'] z = field()
class Foo(object): a = field(type_hint=int, default=0, check_type=True) b = field(type_hint=int, validators={'is positive': lambda x: x > 0}) c = field(default_factory=copy_field(a)) __init__ = make_init()
class C(B, A): a = field(default=None) c = field(default_factory=copy_field('b'))