alternative python solution

My alternative class based python solution using `__new__` and `__call__`

http://ideone.com/6vw1NA