Robert Lupton, I see your point but I think that if a python utility function is created we are still left with the problem of changing the default mask planes in multiple places (if they ever change). At the very least the object that defines the default masked planes should be public, which it currently isn't.
The "multiple places" being one C++ and one python function? True. So that's an argument for writing the utility function in C++ so it can be called by the Mask ctor. Actually, it is in C++ (setInitMaskBits() in an anon namespace so not part of the API — although that assumes an empty dict and doesn't empty it first).
Incidentally, I don't like using swig to mess with the API – if you want to extend the API, please extend it in C++. One reason for people being confused by swig is the tendency for some of our wrappers to be full of %extend blocks instead of letting swig do its thing. I hope that this isn't going to complicate the pybind11 switch too much (if it happens)