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

All Samples(12)  |  Call(7)  |  Derive(0)  |  Import(5)

        def dict_update_new(target, source):
    '''
    Update values in "source" that are new (not currently present) in "target".
    '''
    for key in source:
        if key not in target:
            target[key] = source[key]
        


src/x/o/xoutil-1.5.4/xoutil/annotate.py   xoutil(Download)
        def __getitem__(self, key):
            from xoutil import Unset
            from xoutil.iterators import dict_update_new
            from xoutil.six import PY3
            d = self.d
                    # in f_globals but inside a __builtins__ key.
                    builtins = f_globals.get('__builtins__', {})
                    dict_update_new(f_globals, builtins)
                while f and res is Unset:
                    dict_update_new(d, f.f_locals)
                    res = d.get(key, Unset)
                    f = self.f = f.f_back
                if res is Unset and f_globals:
                    dict_update_new(d, f_globals)

src/x/o/xoutil-1.5.4/xoutil/objects.py   xoutil(Download)
 
    '''
    from xoutil.iterators import dict_update_new
    dict_update_new(kwargs, {'default': Unset})
    return get_first_of(sources, name, **kwargs)

src/x/o/xotl.ql-0.2.1dev/tests/test_translate.py   xotl.ql(Download)
def test_naive_plan_no_join(**kwargs):
    from xoutil.iterators import dict_update_new
    from xotl.ql.translation.py import naive_translation
    select_old_entities = these(who
                                for who in Entity
                                if who.name.startswith('Manuel'))
    dict_update_new(kwargs, dict(only='test_translate.*'))
def test_ridiculous_join(**kwargs):
    from itertools import product
    from xoutil.iterators import dict_update_new
    from xotl.ql.translation.py import naive_translation
    select_old_entities = these((who, who2)
                                for who in Person
                                for who2 in Person)
    dict_update_new(kwargs, dict(only='test_translate.*'))
def test_traversing_by_nonexistent_attribute(**kwargs):
    from xoutil.iterators import dict_update_new
    from xotl.ql.translation.py import naive_translation
    dict_update_new(kwargs, dict(only='test_translate.*'))