Toggling off the feature would be done by setting default=str. But I guess this would be a breaking change. Another disadvantage is that explicit is better than implicit like the Python's Zen says. Maybe it's not clear that it will use int if we remove cast, for example.
I'm not happy with the idea so I'm going to close it to remove noise.
I simply want to put the idea on the table. If
default
is set andcast
is not, maybe we could default to usecast = type(default)
?Before:
After:
Toggling off the feature would be done by setting
default=str
. But I guess this would be a breaking change. Another disadvantage is that explicit is better than implicit like the Python's Zen says. Maybe it's not clear that it will useint
if we removecast
, for example.I'm not happy with the idea so I'm going to close it to remove noise.