imiptools/data.py | raw changeset files shortlog |
1.1 --- a/imiptools/data.py Tue Feb 10 00:40:51 2015 +0100 1.2 +++ b/imiptools/data.py Tue Feb 10 16:43:16 2015 +0100 1.3 @@ -245,6 +245,11 @@ 1.4 def get_uri(value): 1.5 return value.lower().startswith("mailto:") and value.lower() or ":" in value and value or "mailto:%s" % value.lower() 1.6 1.7 +uri_value = get_uri 1.8 + 1.9 +def uri_values(values): 1.10 + return map(get_uri, values) 1.11 + 1.12 def uri_dict(d): 1.13 return dict([(get_uri(key), value) for key, value in d.items()]) 1.14