Guido van Rossum wrote: > it means we'll be catching AttributeError > instead of using "look before you leap", which if fine with me.
A thought on this: to avoid masking bugs, when catching AttributeError you really need to isolate the getattr operation so that it's on a line by itself, with no sub-expressions, i.e. try: x = getattr(obj, name) except AttributeError: ... else: ... If you're doing that, I see no significant lack of readability in the getattr call that needs to be remedied. So I'm down to -2 now. :-) -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com