The generator has taken care of default = [] and replaced it with None in the __init__, but not for defaults such as [0., 0., 0.], so you end up with def __init__(something=[0., 0., 0.]).
For the current generated classes, there is however no sharing of mutable objects among instances because these default values are first copied and validated before being saved to the data container. However, it is considered a common practice not to have mutables as arguments' defaults.
The generator has taken care of
default = []
and replaced it withNone
in the__init__
, but not for defaults such as[0., 0., 0.]
, so you end up withdef __init__(something=[0., 0., 0.])
.For the current generated classes, there is however no sharing of mutable objects among instances because these default values are first copied and validated before being saved to the data container. However, it is considered a common practice not to have mutables as arguments' defaults.