Commits

Maciej Fijalkowski committed f53356f

add some docstrings

Comments (0)

Files changed (1)

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"))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.