Comment by heavenlyblue

3 years ago

The same author would say something similar about C/C++ where by obtaining the address of a function and then writing a value to that address you can change the code of the program.

Yes, you are misusing the API. No, there ARE valid use-cases for it: for example a lot of testing/mocking facilities in Python are so easy to implement because of these features. No, the fact that you can't do it in statically typed languages does not imply Python must go the same way.