Closed mcg1969 closed 5 years ago
Hey Michael
This was a design/performance decision, as recursive type checking proved too expensive.
When passing arguments using embedPy
Unwrapping of embedPy objects inside q 'containers' (lists, dictionaries, tables etc) will not take place by default. In most cases, no conversion is even necessary (as the argument consists solely of q data) and the performance hit is too great.
Understood. I'd like to suggest, then, that the documentation offer an explicit caution about this (if it doesn't already; I may have missed it!). You've made it quite easy of course to use the backtick to do a "full" unwrapping, so I really don't find it too inconvenient, it's just good to know it's necessary sometimes.
I was playing with some advanced IPython widget usage that requires passing in lists whose first element is a Python object. Unfortunately, while bare Python objects are automatically unwrapped on the way back to Python, that's not true of Python objects in a list. I did discover that you can force them to be unwrapped, but it seems better if the embedPy functionality would do this recursively on lists and other composite objects.
Output:
What seems sensible is that the to have to use that back-tick notation, so that the second line behaves the way the third one does.