En ny util-funksjon.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2011-10-08 11:37:37 +00:00
parent 66d1ca3827
commit f39cbbe957

View File

@ -53,6 +53,11 @@ def maptup(fun, lst):
def translate(value, translations):
return translations.get(value, value)
def str_or_empty(value):
if value:
return str(value)
return ''
def p(s):
encoded = s
if isinstance(s, unicode):