Is decorators in python example of monkey patching technique?
<p>Recently I was reading about monkey patching technique and wondered if it can be said.</p>

<p>Decorator = a function that takes a function as an argument and returns a function</p>

<p>Monkey patching = replacing a value of a field on an object with a different value (not necessarly functions)</p>

<p>In case of functions monkey patching can be performed via a decorator. So I guess decorator might be thought as an example of monkey patching. However commonly monkey patching refers to altering behaviour of a 3rd party library. In that case decorators are less useful.</p>

python monkeypatching