-
Notifications
You must be signed in to change notification settings - Fork 668
Description
Dynamo version
(Which version of Dynamo are you using? Go to Help > About if you're not sure.)

Operating system
Win10
What did you do?
Observed the following issues with the new dictionary implementation in V2.0 in relation to ZT multi-port outputs.
Issue 1:
The objects string representation shows only 'Dictionary' which is a noticeable departure from the watch window (the one directly accessible from the node) in previous versions, and is not very useful to users as they cant see the values nor the keys without the addition of Watch nodes:

For example, I would expect to see this, which leads to the second issue:

Issue 2
Dictionaries are unordered collections, but that introduces a new problem to users familiar with how Dynamo displays the string output in previous versions, as the order of the value keys no longer align with the order of the output ports - I would expect this to cause a lot of confusion to those still learning the ropes:

Conundrum:
Strictly speaking, multi-port ZT nodes are a bit of an anomaly as the dictionary values are rerouted to singletons or lists then output by the nodes ports (albeit, only in the visual programming environment), meaning the return type is not a dictionary. Another way to frame it would be "how can I get the dictionary object from a multi-port ZT node". The answer is, you cant, because of this behaviour, so why show the string representation as 'Dictionary'?
Technically then, the return type shown here is wrong:

But of course, in the text-based programming environment, the return type is the expected type (i.e. a dictionary):
The conundrum then is how to represent the differing return types based on the context.
Since this is already an anomaly, my suggestion would be to keep the existing behavior of multi-port ZT nodes unchanged in the node/visual programming environment (i.e. output a list of lists and ensure the string representation also shows this) as the latest behavior is contradictory. Where it starts getting awkward is in situations where a user starts with the node version and sees a list, then does node to code or calls the same ZT node in DS, and is confronted by an inconsistent philosophy regarding return types as they will see a dictionary instead.
