Popular recipes by Maxime H Lapointe http://code.activestate.com/recipes/users/4185033/2013-01-28T05:03:43-08:00ActiveState Code RecipesOptional arguments decorator (Python) 2013-01-28T05:03:43-08:00Maxime H Lapointehttp://code.activestate.com/recipes/users/4185033/http://code.activestate.com/recipes/578435-optional-arguments-decorator/ <p style="color: grey"> Python recipe 578435 by <a href="/recipes/users/4185033/">Maxime H Lapointe</a> (<a href="/recipes/tags/class_decorator/">class_decorator</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/decorators/">decorators</a>, <a href="/recipes/tags/python/">python</a>). Revision 2. </p> <p>If you need your decorator to receive arguments, optional or not, then you should decorate it with the opt_arg_dec decorator to handle all the logic that this implies for you.</p>