update python, add function & method