Projects/worblehat-old
Projects
/
worblehat-old
Archived
12
0
Fork 0

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
1 changed files with 5 additions and 0 deletions

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):