Why can't I use integers as keys in dictionary?

Hi all,

I am trying to create a dictionary using integers as keys, it seems however that Dynamo doesn’t accept integers as keys.

This is not really an issue (i’ll just use the “Object to String” node), but now I’m wondering if there is a specific reason why this is not possible.

It’s a data type thing, just like you can’t use “Aardvark” and “Half past noon” for multiplication. Dictionaries need a string for the data type given as a key so that they can leverage hashing of lookup tables (similar to how spellcheck works) for finding the data faster; doubles are stored differently so they won’t work here.