-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Description
I noticed strange behavior while trying to use ternary operator with boost::python::dict and list.
I'm trying to do something like this
using py = boost::python;
py::dict globals;
py::dict dict;
py::list list;
bool condition = true;
globals["mol"] = condition ? dict : list;
py::exec("print(type(mol))", globals);What I expected: <class 'list'> or <class 'dict'>
What I got: <class 'Boost.Python.function'>
Is it expected behavior? Then can someone explain me why?
Or this is a bug?
Metadata
Metadata
Assignees
Labels
No labels