Finding the value passed for a particular parameter to a function by name

Category: Python - Miscellaneous

Sometimes inside a decorator that creates a function with a generic (args, *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. Date: 07 February, 2012


Programs

Homepage: http://code.activestate.com/recipes/498090-finding-the-value-passed-for-a-particular-paramete/?in=lang-python

Developer: Jacob Smullyan

License: Python License

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

The GNU inetutils are a collection of common networking utilities and servers including ftp, ftpd, rcp, rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, talkd, telnet, telnetd, tftp, tftpd, and uucpd.

developer Developer: FSF & GNU
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


Get free ajax script downloads/software which are used by thousands of websites around the world.

developer Developer: bharathi
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


Get free perl script downloads/software which are used by thousands of websites around the world.

developer Developer: bharathi
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


Get free java server pages script downloads which are used by thousands of websites around the world.

developer Developer: bharathi
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


Accounting Tape Calculator makes use of textarea input to mimic tape as calculations are output upwards line by line in a scrolling tape fashion.

developer Developer: dynamicreport.com
license License: Freeware
operating systems Operating System: Linux, Unix, Windows


Active Image Resizing With Drag is a multi-platform compatible script that allows you to resize one or more images on a page by clicking and dragging on the image(s).

developer Developer: www.codefoot.com
license License: Freeware
operating systems Operating System: Unix/Linux/Windows


Able's Dynamic Textarea Colors is a multi-platform compatible script for an effect that changes the foreground, background, and scrollbar colors of a textarea box when a visitor moves the mouse over or out of a text area.

developer Developer: AbleCode
license License: Freeware
operating systems Operating System: Unix/Linux/Windows


This module provides an advanced, easy-to-use API for
accessing and mutating the Microsoft Windows Registry.

developer Developer: Stephen Chappell
license License: Python License
operating systems Operating System: Windows


This recipe allows one to use the "with" statement to time sections of code.

developer Developer: Connelly Barnes
license License: Python License
operating systems Operating System: Windows