mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-14 10:08:32 +05:00
add 'items' to Flags, for same behavior as dict
This commit is contained in:
parent
331e47830e
commit
bb2989e1c5
@ -195,6 +195,10 @@ PYBIND11_MODULE(pyngcore, m) // NOLINT
|
|||||||
{
|
{
|
||||||
return CreateDictFromFlags(flags);
|
return CreateDictFromFlags(flags);
|
||||||
})
|
})
|
||||||
|
.def("items", [](const Flags& flags)
|
||||||
|
{
|
||||||
|
return CreateDictFromFlags(flags).attr("items")();
|
||||||
|
})
|
||||||
;
|
;
|
||||||
py::implicitly_convertible<py::dict, Flags>();
|
py::implicitly_convertible<py::dict, Flags>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user