Open robertodr opened 1 year ago
Yes, it's intended. Every annotation corresponds to an argument to __init__
.
I checked the 'Differences' table and it isn't clear so I understand the confusion. (Setting a default to None
is simply a way of avoiding having to pass it as an argument. I never considered that you might actually want to hide an argument, to be honest I'm still not sure I see the utility.)
A field without an annotation is not included in the arguments to __init__
, but this means it acts like a class variable (is not copied upon instantiation) which is probably not what you want.
I'm comparing this package to the standard dataclasses.
In this case, the
__init__
method will only accepts thewheels
argument:However, the equivalent with
dataclassy
:will accept both
wheels
and_wheels
as arguments. Is this intended?