Sebastiaan de Haan wrote: > Thank you Chris, > > I'll try and find the attribute in the code. That was my conclusion > aswell... The original author must have defined it somewhere...
Don't forget to check whether the object's class (or any of its bases) has a __getattr__() or __getattribute__() method. >>> class A(object): ... def __getattr__(self, name): ... return 42 ... >>> a = A() >>> a.as File "<stdin>", line 1 a.as ^ SyntaxError: invalid syntax Note tha you can still access such an attribute using getattr() >>> getattr(a, "as") 42 Peter -- http://mail.python.org/mailman/listinfo/python-list