Re: [Python-Dev] Re: Confusing "hasattr" behaviour

2005-02-24 Thread Just van Rossum
Terry Reedy wrote: > > "J. David Ibanez" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Given that the behavior of hasattr is clearly defined in Lib Manual > 2.1 as equivalent to > > def hasattr(obj, name): > try: > getattr(obj, name) > return True > except: >

[Python-Dev] Re: Confusing "hasattr" behaviour

2005-02-24 Thread Terry Reedy
"J. David Ibanez" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Given that the behavior of hasattr is clearly defined in Lib Manual 2.1 as equivalent to def hasattr(obj, name): try: getattr(obj, name) return True except: return False I am not sure what could be co