Update note section of tutorial.txt.
[hooke.git] / hooke / util / convert.py
index 44955a574791a9fd04f6d717b2daae45a6960cdc..83ec76435d4f66301c9b7512c7f181c80a9e99e8 100644 (file)
@@ -3,14 +3,6 @@
 """Type conversion utilities.
 """
 
-CONVERT_FROM_STRING = {
-    'string': lambda x: x,
-    'bool': lambda x: x == 'True',
-    'int': lambda x: int(x),
-    'float': lambda x: float(x),
-    }
-"""Functions converting strings to values, keyed by type.
-"""
 
 ANALOGS = {
     'file': 'string',
@@ -63,6 +55,8 @@ def from_string(value, type, count=1):
     return fn(value)
 
 def _string_to_string(value):
+    if len(value) == 0:
+        return None
     return unicode(value)
 
 def _string_to_bool(value):