mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
Merge branch 'automatic_flags_to_dict' into 'master'
Add Flags.keys() in Python, for working dict(flags) See merge request ngsolve/netgen!584
This commit is contained in:
commit
caa8912d7f
@ -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