Using the default argument supported by getattr makes this code a bit
simpler and probably (ever so slightly) faster.
See https://forum.freecadweb.org/viewtopic.php?f=10&t=58611 for previous
discussion.
This is not an exhaustive change, these are just a few I encounted while
working with the code.