mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
Add Flags.keys() in Python, for working dict(flags)
This commit is contained in:
parent
ca5f562503
commit
8e6ee3cbb8
@ -165,6 +165,9 @@ PYBIND11_MODULE(pyngcore, m) // NOLINT
|
||||
return self;
|
||||
}, py::arg("akey"), py::arg("value"), "Set flag by given value.")
|
||||
|
||||
.def("keys", [](Flags & self) -> py::list {
|
||||
return CreateDictFromFlags(self).attr("keys")();
|
||||
})
|
||||
.def("__getitem__", [](Flags & self, const string& name) -> py::object {
|
||||
|
||||
if(self.NumListFlagDefined(name))
|
||||
|
Loading…
Reference in New Issue
Block a user