Functions
data_tools Namespace Reference

Functions

def behaves_like_dict
def make_dir_list
def merge

Function Documentation

def data_tools.behaves_like_dict (   object)
Check if object is dict-like

Definition at line 26 of file data_tools.py.

def data_tools.make_dir_list (   path)
Create list from path where each directory is one list entry 

Definition at line 6 of file data_tools.py.

def data_tools.merge (   a,
  b 
)
Merge two deep dicts non-destructively

Uses a stack to avoid maximum recursion depth exceptions

>>> a = {'a': 1, 'b': {1: 1, 2: 2}, 'd': 6}
>>> b = {'c': 3, 'b': {2: 7}, 'd': {'z': [1, 2, 3]}}
>>> c = merge(a, b)
>>> from pprint import pprint; pprint(c)
{'a': 1, 'b': {1: 1, 2: 7}, 'c': 3, 'd': {'z': [1, 2, 3]}}

Definition at line 31 of file data_tools.py.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


planner_benchmarks
Author(s): Multiple
autogenerated on Tue Jan 22 2013 12:24:38