Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)
set or add to an existing value 

        def add(mapping, key, value):
    """ set or add to an existing value """
    if mapping.has_key(key):
        mapping[key] += value
    else:
        mapping[key] = copy(value)
        


src/m/r/mr.bent-1.0a1/mr/bent/wrapper.py   mr.bent(Download)
from mavolio import create, destroy, current, add, filters
from monkey import funcinfo, wrap
 
 
def fqfn(function):
    def wrapper(function, *args, **kwargs):
        context = current()
        if context is not None:
            data, result = handler(function, *args, **kwargs)
            add(context, (None, dottedname, name), data)
            for f in filters:
                add(context, (f, dottedname, name), data)