Closed
Description
Here is an example of a bug:
class Foo(Structure):
a: Array(items=String, default=list)
foo = Foo()
assert foo.a == []
foo.a.append(123) # this should be invalid, but it works since the list is disconnected from the structure
assert foo.a == [123] # fails, since foo.a returns [] .
If defaults will be set during initialization instead, it would work as expected.