[pypy-dev] hasattr issue

Sanghyeon Seo sanxiyn at gmail.com
Sat Mar 18 04:41:38 CET 2006


Following code behaves differently from CPython:

class NoAttribute(object):
    def __getattr__(self, name):
        raise Exception

obj = NoAttribute()
print hasattr(obj, 'attribute')

Seo Sanghyeon



More information about the Pypy-dev mailing list