Commits

Maciej Fijalkowski committed f53356f

add some docstrings

  • Participants
  • Parent commits 87bfc88

Comments (0)

Files changed (1)

File pypy/module/__pypy__/interp_dict.py

 
 @unwrap_spec(type=str)
 def newdict(space, type):
+    """ newdict(type)
+
+    Create a normal dict with a special implementation strategy.
+
+    type is a string and can be:
+
+    * "module" - equivalent to some_module.__dict__
+
+    * "instance" - equivalent to an instance dict with a not-changing-much
+                   set of keys
+
+    * "kwargs" - keyword args dict equivalent of what you get from **kwargs
+                 in a function, optimized for passing around
+
+    * "strdict" - string-key only dict. This one should be chosen automatically
+    """
     if type == 'module':
         return space.newdict(module=True)
     elif type == 'instance':
                               type)
 
 def dictstrategy(space, w_obj):
+    """ dictstrategy(dict)
+
+    show the underlaying strategy used by a dict object
+    """
     if not isinstance(w_obj, W_DictMultiObject):
         raise OperationError(space.w_TypeError,
                              space.wrap("expecting dict object"))