parameters: (x)
docstring: Recursively transforms a dictionary into a OrderedBunch via copy.
          
          >>> b = ordered_bunchify({'urmom': {'sez': {'what': 'what'}}})
          >>> b.urmom.sez.what
          'what'
          
          ordered_bunchify can handle intermediary dicts, lists and tuples (as well as 
          their subclasses), but ymmv on custom datatypes.
          
          >>> b = ordered_bunchify({ 'lol': ('cats', {'hah':'i win again'}), 
          ...         'hello': [{'french':'salut', 'german':'hallo'}] })
          >>> b.hello[0].french
          'salut'
          >>> b.lol[1].hah
          'i win again'
          
          nb. As dicts are not hashable, they cannot be nested in sets/frozensets.
docstring_summary: Recursively transforms a dictionary into a OrderedBunch via copy.
          
          >>> b = ordered_bunchify({'urmom': {'sez': {'what': 'what'}}})
          >>> b.urmom.sez.what
          'what'
          
          ordered_bunchify can handle intermediary dicts, lists and tuples (as well as 
          their subclasses), but ymmv on custom datatypes.
          
          >>> b = ordered_bunchify({ 'lol': ('cats', {'hah':'i win again'}), 
          ...         'hello': [{'french':'salut', 'german':'hallo'}] })
          >>> b.hello[0].french
          'salut'
          >>> b.lol[1].hah
          'i win again'
          
          nb. As dicts are not hashable, they cannot be nested in sets/frozensets.
docstring_tokens: Recursively transforms a dictionary into a OrderedBunch via copy . >>> b = ordered_bunchify ( { urmom : { sez : { what : what }}} ) >>> b . urmom . sez . what what ordered_bunchify can handle intermediary dicts lists and tuples ( as well as their subclasses ) but ymmv on custom datatypes . >>> b = ordered_bunchify ( { lol : ( cats { hah : i win again } ) ... hello : [ { french : salut german : hallo } ] } ) >>> b . hello [ 0 ] . french salut >>> b . lol [ 1 ] . hah i win again nb . As dicts are not hashable they cannot be nested in sets / frozensets .
function: def ordered_bunchify(x):
      """ Recursively transforms a dictionary into a OrderedBunch via copy.
          
          >>> b = ordered_bunchify({'urmom': {'sez': {'what': 'what'}}})
          >>> b.urmom.sez.what
          'what'
          
          ordered_bunchify can handle intermediary dicts, lists and tuples (as well as 
          their subclasses), but ymmv on custom datatypes.
          
          >>> b = ordered_bunchify({ 'lol': ('cats', {'hah':'i win again'}), 
          ...         'hello': [{'french':'salut', 'german':'hallo'}] })
          >>> b.hello[0].french
          'salut'
          >>> b.lol[1].hah
          'i win again'
          
          nb. As dicts are not hashable, they cannot be nested in sets/frozensets.
      """
      if isinstance(x, dict):
          return OrderedBunch( (k, ordered_bunchify(v)) for k,v in x.iteritems() )
      elif isinstance(x, (list, tuple)):
          return type(x)( ordered_bunchify(v) for v in x )
      else:
          return x
function_tokens: def ordered_bunchify ( x ) : if isinstance ( x , dict ) : return OrderedBunch ( ( k , ordered_bunchify ( v ) ) for k , v in x . iteritems ( ) ) elif isinstance ( x , ( list , tuple ) ) : return type ( x ) ( ordered_bunchify ( v ) for v in x ) else : return x