Message 69933 - Python tracker
Oops, you are right. If that is the way we should handle this
regression, I could upload a patch. I also thought we could use
"hasattr", but that means using "getattr" twice. Something like:
if word[:n] == attr and word != "__builtins__" and hasattr(object, word):
val = getattr(object, word)
What do you think about it?