Description
Why ?
Working with data requires a certain amount of organizing the data. Dictionaries are often and Dynamo provides two ways of making this.
The first method would be to use the newly added support for dictionaries in Dynamo. The second method would be to use python dictionary if you make your workflow in python. But what to do if you want to place the python dictionary in the OUT node to use it outside of the python node?
Trying to export a python dictionary would be something like:
The solution is quite simple. Dynamo dictionaries are in fact the dictionaries from the .NET Collections namespace. You can find them under https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=netframework-4.7.2
Implementing this generic dictionary in python is quite simple. The code is self explanatory: