什么是猴子补丁
the term monkey patch only refers to dynamic modifications of a class or module at runtime, motivated by the intent to patch existing third-party code as a workaround to a bug or feature which does not act as desired
即在运行时对方法 / 类 / 属性 / 功能进行修改,把新的代码作为解决方案代替原有的程序,也就是为其打上补丁。
为什么叫做猴子补丁
The term monkey patch seems to have come from an earlier term, guerrilla patch, which referred to changing code sneakily – and possibly incompatibly with other such patches – at runtime.The word guerrilla, homophonous with gorilla (or nearly so), became monkey, possibly to make the patch sound less intimidating.[1] An alternative etymology is that it refers to “monkeying about” with the code (messing with it).
一种说法杂牌军、游击队的英文发音与猩猩相似,杂牌军、游击队不是原装军队,就像是替补,所以也就演变叫做猴子补丁
另一种说法“monkeying about”有胡闹,顽皮,哄骗的意思,所以叫做猴子补丁
python中使用猴子补丁
如果你对python感兴趣,我这有个学习