Use __getattr__
Merge pull request #2 from dongweiming/use_getattr

Use __getattr__