Finding the value passed to a function by name 1.2

Version: 1.2

Downloads:0

Hits:388

SourceNO

Link Broken:Report It!

Package:Without source

Price:$0

More info Download

Description

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. This script contains an utility function that extracts this information for you. This function is meant to be used inside decorators, when you want to find what value will be available inside a wrapped function for a particular argument name. It handles positional and keyword arguments and takes into account default values.

Language: Python

Related:

Finder - Function - Function Argument - Function Value Finder - Function Wrapper - Value

User Reviews:

Write Review *
Your name *
Email *
(Your comments will be reviewed by our staff before they are posted)
Rate this product *
Captcha Image
Enter code from image *

 

Related:

Determining the current functions name 1.3

This script defines the whoaminow() function that can be used inside a function to determine, at the time it is called, the name under which...

By: code.activestate.com Homepage

Freeware

Changing a closed-over value 1.0

In most languages with closures, it is possible to change a closed-over value and have the change visible in other closures which share a reference...

By: code.activestate.com Homepage

Freeware

z_delegate 1.0

This script was written to emulate a flexible version of delegates from the C# language.

By: code.activestate.com Homepage

Freeware

Timeit module wrapper 1.3

This script contains a simple, easy to use wrapper function for doing quick tests of your functions using the timeit module.

By: code.activestate.com Homepage

Freeware

Automatic Recursion 1.3

This script presents you the tools for easy and stable recursion of current function when only selected arguments have to be changed.

By: code.activestate.com Homepage

Freeware

DrawFace 1.0

The tDrawFace is a smart drawing canvas on the Delphi 7 and provides the folloving:
* Panning (dragging of middle-button)
* Some zooming...

By: Drawface Coo.

Freeware

SHBrowseForFolder Dialog 1.0

TSHBrowseForFolderDialog is simple to use wrapper for SHBrowseForFolder() function. It features: All possible options (BIF - flags) of this...

By: Serge Redfield

Freeware

Flash Color Picker

Flash Color Picker is a simple, handy flash color palette which can be loaded into the websites to increase its attractiveness. To handle the color...

By: Flash-here.com Homepage

Freeware

Calculate Latitude and Longitude using V&H in Perl 2.0

This function calculates the latitude and longitude coordinates from Vertical and Horizontal (V&H) coordinates. V&H's are used to identify...

By: AreaCodeWorld.com Homepage

Freeware

Calculate Latitude and Longitude using V&H in C 2.0

This function calculates the latitude and longitude coordinates from Vertical and Horizontal (V&H) coordinates. V&H's are used to identify...

By: AreaCodeWorld.com Homepage

Freeware