getattr needs a default argument