In The Following Python Code Which Function Is The Decoratorp #134
In the following Python code, which function is the decorator?</p> <pre><code class="language-python">def mk(x): def mk1(): print("Decorated") x() return mk1 def mk2(): print("Ordinary") p = mk(mk2) p()</code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs109 Python.
It can also be found in
gs gs109 Formatting & Decorators in Python - Python Decorators - Quiz No.1.