Popular recipes by Cara http://code.activestate.com/recipes/users/4191397/2015-09-22T18:16:40-07:00ActiveState Code RecipesKeyword-only arguments in Python 2.x (Python) 2015-09-22T18:16:40-07:00Carahttp://code.activestate.com/recipes/users/4191397/http://code.activestate.com/recipes/578993-keyword-only-arguments-in-python-2x/ <p style="color: grey"> Python recipe 578993 by <a href="/recipes/users/4191397/">Cara</a> (<a href="/recipes/tags/arguments/">arguments</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/keyword/">keyword</a>, <a href="/recipes/tags/keyword_only/">keyword_only</a>). Revision 10. </p> <p>This is a decorator that makes some of a function's or method's arguments into keyword-only arguments. As much as it possible, it emulates the Python 3 handling of keyword-only arguments, including messages for TypeErrors. It's compatible with Python 3 so it can be used in code bases that support both versions.</p>