Popular recipes by Jacob Smullyan http://code.activestate.com/recipes/users/121058/2006-09-14T15:57:06-07:00ActiveState Code RecipesFinding the value passed for a particular parameter to a function by name (Python)
2006-09-14T15:57:06-07:00Jacob Smullyanhttp://code.activestate.com/recipes/users/121058/http://code.activestate.com/recipes/498090-finding-the-value-passed-for-a-particular-paramete/
<p style="color: grey">
Python
recipe 498090
by <a href="/recipes/users/121058/">Jacob Smullyan</a>
(<a href="/recipes/tags/programs/">programs</a>).
Revision 3.
</p>
<p>Sometimes inside a decorator that creates a function with a generic (<em>args, *</em>kwargs) signature, you want to access a value passed for a particular parameter name to a wrapped function, but don't know whether that value will be passed as a positional or keyword argument, or whether the wrapped function defines a default value for the parameter. The following utility function extracts this information for you.</p>
Marshalling Python Data into Javascript (Python)
2003-05-20T14:56:08-07:00Jacob Smullyanhttp://code.activestate.com/recipes/users/121058/http://code.activestate.com/recipes/200839-marshalling-python-data-into-javascript/
<p style="color: grey">
Python
recipe 200839
by <a href="/recipes/users/121058/">Jacob Smullyan</a>
(<a href="/recipes/tags/web/">web</a>).
</p>
<p>When writing web applications with an application framework like SkunkWeb, it is sometimes desirable to make Python data available to client-side Javascript. This recipe creates a function, to_js, that marshals Python data into a Javascript string.</p>