Did I find the right examples for you? yes no

All Samples(14)  |  Call(8)  |  Derive(0)  |  Import(6)
update nested dict `a` with another dict b.
usage::

    >>> a = {'x' : { 'y': 1}}
    >>> b = {'x' : {'z':2, 'y':3}, 'w': 4}
    >>> update_nested_dict(a,b)
    {'x': {'y': 3, 'z': 2}, 'w': 4}

        def update_nested_dict(a, b):
    """
    update nested dict `a` with another dict b.
    usage::

        >>> a = {'x' : { 'y': 1}}
        >>> b = {'x' : {'z':2, 'y':3}, 'w': 4}
        >>> update_nested_dict(a,b)
        {'x': {'y': 3, 'z': 2}, 'w': 4}

    """
    for k, v in b.iteritems():
        if isinstance(v, dict):
            d = a.setdefault(k, {})
            update_nested_dict(d, v)
        else:
            a[k] = v
    return a
        


src/l/i/lilac-0.3.9/lilac/generator.py   lilac(Download)
from .exceptions import *
from .logger import logger, logging
from .utils import chunks, update_nested_dict, mkdir_p, join
from .models import Post, Tag, Page
from .models import blog, author, about, tags, archives, feed, page_404, charset
            sys.exit(1)
 
        update_nested_dict(self.config, conf)
        # update blog and author according to configuration
        self.blog.__dict__.update(self.config['blog'])
        # user's configuation can reset theme's configuation
        config_theme_section = self.config.get("theme", {})
        update_nested_dict(self.theme, config_theme_section)
 
        # get templates directory

src/l/i/lilac-HEAD/lilac/generator.py   lilac(Download)
from .exceptions import *
from .logger import logger, logging
from .utils import chunks, update_nested_dict, mkdir_p, join
from .models import Post, Tag, Page
from .models import blog, author, about, tags, archives, feed, page_404, charset
            sys.exit(1)
 
        update_nested_dict(self.config, conf)
        # update blog and author according to configuration
        self.blog.__dict__.update(self.config['blog'])
        # user's configuation can reset theme's configuation
        config_theme_section = self.config.get("theme", {})
        update_nested_dict(self.theme, config_theme_section)
 
        # get templates directory

src/r/u/rux-0.6.0/rux/generator.py   rux(Download)
from .parser import parser
from .renderer import renderer
from .utils import chunks, update_nested_dict, mkdir_p, join
 
 
 
        # update default configuration with user defined
        update_nested_dict(self.config, conf)
        self.blog.__dict__.update(self.config['blog'])
        self.author.__dict__.update(self.config['author'])

src/r/u/rux-HEAD/rux/generator.py   rux(Download)
from .parser import parser
from .renderer import renderer
from .utils import chunks, update_nested_dict, mkdir_p, join
 
 
 
        # update default configuration with user defined
        update_nested_dict(self.config, conf)
        self.blog.__dict__.update(self.config['blog'])
        self.author.__dict__.update(self.config['author'])

src/r/u/rux-0.6.0/rux/pdf.py   rux(Download)
from .logger import logger
from .models import blog, author, Post
from .utils import update_nested_dict, join
 
 
            sys.exit(e.exit_code)
 
        update_nested_dict(self.config, conf)
 
        self.blog.__dict__.update(self.config['blog'])

src/r/u/rux-HEAD/rux/pdf.py   rux(Download)
from .logger import logger
from .models import blog, author, Post
from .utils import update_nested_dict, join
 
 
            sys.exit(e.exit_code)
 
        update_nested_dict(self.config, conf)
 
        self.blog.__dict__.update(self.config['blog'])