Open YooSunYoung opened 2 months ago
This may not be as usable as you think. We would have to use the fully qualified names of types to avoid collisions:
>>> res = {int: 3, float: 4.1}
>>> toolz.keymap(sciline._utils.key_full_qualname, res)
{'builtins.int': 3, 'builtins.float': 4.1}
Is spelling out modules really better than importing names?
This may not be as usable as you think. We would have to use the fully qualified names of types to avoid collisions:
>>> res = {int: 3, float: 4.1} >>> toolz.keymap(sciline._utils.key_full_qualname, res) {'builtins.int': 3, 'builtins.float': 4.1}
Is spelling out modules really better than importing names?
No I don't think so. I much prefer using the dedicated type-object than string-keys.
But the original idea was not my opinion...
I opened it to see if anyone else has the similar feedback.
I had a feed back about sciline interface that it can be cumbersome to import all the types you need to retrieve results.
It might be helpful to have a helper function that turns
dict[type, Any]
into adict[str, Any]
...?