Commits

Mike Orr committed a694333

Rename 'dict_of' functions in webhelpers.containers.

dict_of_dicts -> correlate_dicts
dict_of_objects -> correlate_objects

Comments (0)

Files changed (1)

webhelpers/containers.py

         except KeyError:
             pass
 
-def correllate_dicts(dicts, key):
+def correlate_dicts(dicts, key):
     """Correlate several dicts under one superdict.
 
     E.g., If you have several dicts each with a 'name' key, this can
 
     >>> d1 = {"name": "Fred", "age": 41}
     >>> d2 = {"name": "Barney", "age": 31}
-    >>> flintstones = correllate_dicts([d1, d2], "name")
+    >>> flintstones = correlate_dicts([d1, d2], "name")
     >>> sorted(flintstones.keys())
     ['Barney', 'Fred']
     >>> flintstones["Fred"]["age"]
     41
+
+    If you're having trouble spelling this method correctly, remember:
+    "relate" has one 'l'.  The 'r' is doubled because it occurs after a prefix.
+    Thus "correlate".
     """
     ret = {}
     i = 0
     ['Barney', 'Fred']
     >>> flintstones["Barney"].age
     31
+
+    If you're having trouble spelling this method correctly, remember:
+    "relate" has one 'l'.  The 'r' is doubled because it occurs after a prefix.
+    Thus "correlate".
     """
     ret = {}
     i = 0
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.