update python method