What will happen if I modify a Python script while it's running? What will happen if I modify a Python script while it's running? python python

What will happen if I modify a Python script while it's running?


Nothing, because Python precompiles your script into a PYC file and launches that.

However, if some kind of exception occurs, you may get a slightly misleading explanation, because line X may have different code than before you started the script.