aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-attrs/check.py
blob: 08af9829fb7db5baae190a48c6b441543711335b (plain)
1
2
3
4
5
6
7
8
9
10
import attr

@attr.s
class SomeClass(object):
    a_number = attr.ib(default=42)
    list_of_numbers = attr.ib(default=attr.Factory(list))

a = SomeClass()
assert a.a_number == 42
assert isinstance(a.list_of_numbers, list)