0

I have a python function

def My_Function():
    Some Codes
    return Something

I want to change Some Codes in My_Function as see the effects in Ipython console. So I modify Some Codes and save the corresponding .py file and import the function in Ipython console: import My_Function. However, when I execute My_Function in Ipython, the old version is executed not the modified one. Why?

1

1 Answer 1

1

Use importlib.reload(module).

Sign up to request clarification or add additional context in comments.

1 Comment

This is a Py3.4 method, Py2 is different.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.