What is monkey patching in Python? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 4

What is monkey patching in Python?

11th Mar 2019, 6:49 AM
RISHABH MISHRA
RISHABH MISHRA - avatar
2 Respuestas
11th Mar 2019, 2:52 PM
Hatsy Rei
Hatsy Rei - avatar
+ 4
Monkey patching is reopening the existing classes or methods in class at runtime and changing the behavior, which should be used cautiously, or you should use it only when you really need to. As Python is a dynamic programming language, Classes are mutable so you can reopen them and modify or even replace them. 🐒🐵
11th Mar 2019, 8:35 AM
Better
Better - avatar