Serhiy Storchaka added the comment: Just use getattr() without third argument and catch AttributeError. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue20654> _______________________________________