testmongo.py 305 B

123456789101112131415161718
  1. #!/usr/bin/python
  2. class Test(object):
  3. def __init__(self,a):
  4. self.a = a
  5. class Empty(object):
  6. def __init__(self):
  7. self.t_id = 1
  8. def __getattribute__(self, name):
  9. print "Called "+name
  10. return object.__getattribute__(self, name)
  11. def method(self):
  12. pass
  13. a = Empty()
  14. print a.t_id
  15. print a.method()