pytave dict hacking
Current implementation may not work correctly if only some of the values are SymPy objects
- [x] confirmed
- [ ] make test for that
Also, dicts with SymPy object values but string keys would not be helped by current implementation (?)
- [x] is that statement true?
- [ ] make test for that
- [ ] Here's one possibility:
- for every dict, we want to convert any keys that are SymPy objects to strings.
- for every dict, we want to convert any keys that are SymPy objects to
sym.
- [ ] There is also the question of what to do in the future when dicts stay as
@pyobject: perhaps we ignore this until then?
Also, dicts with SymPy object values but string keys would not be helped by current implementation (?)
True. I made this to fix the tests which needed dicts with SymPy objects as keys..
- for every dict, we want to convert any keys that are SymPy objects to strings.
- for every dict, we want to convert any keys that are SymPy objects to sym.
I tried this but could not think of a way to only partially convert a dict in octave. If we are to support this then we will have to do all the conversions in octave... Maybe call pyeval on each element instead..
There is also the question of what to do in the future when dicts stay as @pyobject: perhaps we ignore this until then?
I think yes. Because there can be nested dicts and whatnot.. So, instead of focusing on this, wouldn't it be better to focus more on speeding the development on @pyobject? (Just my view)
I think I agree with all that.