Open steeling opened 2 months ago
When dealing with a dict of type {str:Any}, we can't set values to {'key': 'value'} because 'value' is of type str which fails type assertions.
{str:Any}
{'key': 'value'}
'value'
Would be a nice to have to allow duck typing on Any
Sorry, do you mean the any type or the Any type?
any
Any
config1: {str:any} = {'key1': 'value', 'key2': 1} config2: {str:} = {'key': 'value'} # We can omit the any in the type annotation.
When dealing with a dict of type
{str:Any}
, we can't set values to{'key': 'value'}
because'value'
is of type str which fails type assertions.Would be a nice to have to allow duck typing on Any