Tp python class