Move try_del to utils

This commit is contained in:
Henrik Nordstrom
2010-11-17 12:03:42 +01:00
parent 2d8cfbafc3
commit bd01126b2b
2 changed files with 15 additions and 15 deletions

View File

@@ -138,6 +138,13 @@ def _caseless(s):
return s.lower()
def try_del(dict, key):
try:
del dict[key]
except KeyError:
pass
class MultiDict:
"""
Simple wrapper around a dictionary to make holding multiple objects per