示例#1
0
 class M:
     s = attr.ib(validator=instance_of(str))
     i = attr.ib(validator=instance_of(int))
     nullable = attr.ib()
     d = datetime_field()
     lst1 = list_field(int)
     lst2 = list_field(X)
示例#2
0
 class MList:
     as_list = list_field(SELF)
示例#3
0
 class N:
     xs = list_field(int, sort_key=lambda x: x, sort_reverse=True)
示例#4
0
 class M:
     xs = list_field(int, sort_key=lambda x: x)
示例#5
0
 class M:
     v = list_field(UnionKind(('v1', V1), ('v2', V2)), is_only_field=True)
示例#6
0
 class And:
     items = list_field(Value, is_only_field=True)
示例#7
0
 class And:
     items = list_field(Value)
示例#8
0
 class M:
     ms = list_field(SELF)
示例#9
0
 class M:
     xs = list_field(str)
示例#10
0
 class M:
     xs = list_field(X)
示例#11
0
 class M:
     xs = list_field(int, validator=v)
示例#12
0
 class M:
     xs = list_field(int)