class DictionaryObject(object):
  """
  A class that has all the functionality of a normal Python dictionary, except
  for the fact it is itself immutable, but it also has the added feature of
  being able to lookup values by using keys as attributes.
  
  Example:
    d = DictionaryObject({'a':1, 'b':True, 3:'x'})
    print d.a, d.b, d[3] ==> 1 True x
  """
  def __init__(self, dictionary=None, recursive=True):
    """
    Take as input a dictionary-like object and return a DictionaryObject.
    If recursive is True, then make sure any keys containing dictionaries
    are also converted to DictionaryObjects.  Otherwise, leave them as vanilla
    Python dictionaries.
    """
    if recursive:
      items = {}
      for k in dictionary: items[k] = dictionary[k]
      for k in items:
        if isinstance(items[k], dict): items[k] = DictionaryObject(items[k], recursive)
      self.__dict__['_items'] = items
    else: self.__dict__['_items'] = dictionary
  
  def __getattr__(self, name):
    if name in self.__dict__: return self.__dict__[name]
    if name in self._items: return self._items[name]
    raise AttributeError("'dict' object has no attribute '%s'" % name)

  def __setattr__(self, name, value):
    raise AttributeError("'dict' object has no attribute '%s'" % name)

  def __getitem__(self, name): return self._items[name]
  def __contains__(self, name): return name in self._items
  def __len__(self): return len(self._items)
  def __iter__(self):
    for k in self._items.keys(): yield k
  def __reversed__(self):
    for k in reversed(self._items.keys()): yield k

  def __repr__(self): return repr(self._items)
  def __str__(self): return str(self._items)

  def keys(self): return self._items.keys()
  def values(self): return self._items.values()

@@ -739,16 +739,25 @@
 ionary: 
+%0A        
 items%5Bk%5D
@@ -834,16 +834,27 @@
  dict): 
+%0A          
 items%5Bk%5D
@@ -942,16 +942,23 @@
   else: 
+%0A      
 self.__d
@@ -1050,16 +1050,23 @@
 dict__: 
+%0A      
 return s
@@ -1112,16 +1112,23 @@
 _items: 
+%0A      
 return s
@@ -1353,24 +1353,29 @@
 elf, name): 
+%0A    
 return self.
@@ -1387,16 +1387,21 @@
 s%5Bname%5D%0A
+    %0A
   def __
@@ -1424,16 +1424,21 @@
  name): 
+%0A    
 return n
@@ -1456,16 +1456,21 @@
 ._items%0A
+    %0A
   def __
@@ -1478,24 +1478,29 @@
 en__(self): 
+%0A    
 return len(s
@@ -1503,32 +1503,37 @@
 en(self._items)%0A
+    %0A
   def __iter__(s
@@ -1571,23 +1571,37 @@
 keys(): 
-yield k
+%0A      yield k%0A      
 %0A  def _
@@ -1662,16 +1662,23 @@
 eys()): 
+%0A      
 yield k%0A
@@ -1696,24 +1696,29 @@
 pr__(self): 
+%0A    
 return repr(
@@ -1730,16 +1730,21 @@
 _items)%0A
+    %0A
   def __
@@ -1748,32 +1748,37 @@
  __str__(self): 
+%0A    
 return str(self.
@@ -1796,32 +1796,37 @@
 def keys(self): 
+%0A    
 return self._ite
@@ -1835,16 +1835,21 @@
 .keys()%0A
+    %0A
   def va
@@ -1860,16 +1860,21 @@
 (self): 
+%0A    
 return s

Update dictobj.py