Open SksOp opened 8 months ago
In python the Dict can have all these as their key
Strings
Numbers
Tuples
Booleans
None
In our typewriter package we have allowed only string and number to be the type of key ( as js only allow these types).
string
number
We need to change this to align with how it is done in python.
NF-37 Change the emplemtation of Dict
In python the Dict can have all these as their key
Strings
: A common choice for keys due to their immutability and ease of use.Numbers
: Both integers and floating-point numbers can be used as keys.Tuples
: Can be used as long as they contain only immutable types themselves (strings, numbers, and other tuples).Booleans
: True and False can be used as keys.None
: Can be used as a key.In our typewriter package we have allowed only
string
andnumber
to be the type of key ( as js only allow these types).We need to change this to align with how it is done in python.