Merge branch 'flags_to_dict' into 'master'

Export Flags.ToDict to python

See merge request jschoeberl/netgen!425
This commit is contained in:
Joachim Schöberl 2021-09-28 12:29:44 +00:00
commit 839c6a23fa

View File

@ -177,6 +177,10 @@ PYBIND11_MODULE(pyngcore, m) // NOLINT
return py::cast(self.GetDefineFlag(name));
}, py::arg("name"), "Return flag by given name")
.def("ToDict", [](const Flags& flags)
{
return CreateDictFromFlags(flags);
})
;
py::implicitly_convertible<py::dict, Flags>();