Trees | Indices | Help |
|
---|
|
Utility functions with algorithms.
|
|||
RunningTimeout Class to calculate remaining timeout when doing several operations. |
|
|||
list |
|
||
dict |
|
||
list |
|
||
set |
|
||
|
|||
|
|||
list |
|
||
|
|||
|
|||
dict |
|
||
|
|||
|
|
|||
_SORTER_GROUPS = 8
|
|||
_SORTER_RE = re.compile("^%s(.*)$" %(_SORTER_GROUPS* r"(\D+|\d
|
Imports: re, time, itertools, compat, text
|
Returns a list with unique elements. Element order is preserved.
|
Joins dictionaries with no conflicting keys. Enforces the constraint that the two key sets must be disjoint, and then merges the two dictionaries in a new dictionary that is returned to the caller.
|
Identifies duplicates in a list. Does not preserve element order.
|
Return the set of keys defined multiple times in the given dicts. >>> GetRepeatedKeys({"foo": 1, "bar": 2}, ... {"foo": 5, "baz": 7} ... ) set("foo")
|
Sort a list of strings based on digit and non-digit groupings. Given a list of names The sort algorithm breaks each name in groups of either only-digits or no-digits. Only the first eight such groups are considered, and after that we just use what's left of the string.
|
Inverts the key/value mapping of a dict.
|
Inserts
Note:
This function does not modify |
Converts a sequence to a dictionary with duplicate detection.
|
Helper function for This function is recursively called
|
Converts a flat structure to a fully fledged dict. It accept a list of tuples in the form: [ ("foo/bar", {"key1": "data1", "key2": "data2"}), ("foo/baz", {"key3" :"data3" }), ] where the first element is the key separated by
This would then return: { "foo": { "bar": {"key1": "data1", "key2": "data2"}, "baz": {"key3" :"data3" }, }, }
|
|
_SORTER_RE
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 22 11:13:09 2016 | http://epydoc.sourceforge.net |