>>> class Test:
          def __getattr__(self, attr):
            print attr

          def foo(x):
            print x

>>> t = Test()
>>> print t
__str__

Traceback (most recent call last):
  File "<pyshell#23>", line 1, in -toplevel-
    print t
TypeError: 'NoneType' object is not callable

what i have to do? define __str__ explicitly?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to