How to store PythonObject in DynamicVector?
I'm trying the following:
And getting:
I tried different combinations, but as long the type is non-imperative type, this won't work. What is a workaround for this?
5 Replies
Congrats @Mahmoud Abduljawad, you just advanced to level 2!
"let" defines a variable that's immutable.
"let dv = DynamicVectorPythonObject"
Have you tried using "var"?
Yes. The problem isn't whether
dv
is immutable or not, it is that PythonObject
is not "passable".This is as far as I got 🙂
No idea where to get PyObjectPtr so it can be specified in DynamicVector parameter.
Not sure if it even makes sense.
Compiler errors are confusing in different scenarios.
There's a lot of undocumented stuff.
This looks like a progress :mojo: I knew the answer would be in using pointers but didn't know how to put in code.