You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Pair-based edges initializer to Graph types #198
Activity
jsbean commentedon Nov 3, 2018
I think this would require an initializer like so:
jsbean commentedon Nov 3, 2018
See
DictionaryLiteralandKeyValuePairs.You can't actually pass a real dictionary in, because tuples are not
Hashable🤦♂️ .jsbean commentedon Nov 3, 2018
But if this is for syntax sugar, then you can use the
DictionaryLiteralsyntax.Give it a try. No guarantees here.
bwetherfield commentedon Nov 3, 2018
Oh! Totally forgot about Hashability!
jsbean commentedon Nov 3, 2018
But
KeyValuePairsdoesn't actually requireHashableconformance :o, I am pretty sure.jsbean commentedon Nov 3, 2018
You would need to do something like: