[Zope3-checkins] CVS: Packages/ZConfig - datatypes.py:1.1.2.11

Fred L. Drake, Jr. fred@zope.com
Fri, 13 Dec 2002 15:15:03 -0500


Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv24497

Modified Files:
      Tag: zconfig-schema-devel-branch
	datatypes.py 
Log Message:
Add a "null" conversion, which returns the original value.


=== Packages/ZConfig/datatypes.py 1.1.2.10 => 1.1.2.11 ===
--- Packages/ZConfig/datatypes.py:1.1.2.10	Fri Dec 13 13:37:36 2002
+++ Packages/ZConfig/datatypes.py	Fri Dec 13 15:15:02 2002
@@ -134,6 +134,10 @@
     integer = int
 
 
+def null_conversion(value):
+    return value
+
+
 def asBoolean(s):
     """Convert a string value to a boolean value."""
     ss = str(s).lower()
@@ -150,6 +154,7 @@
     "integer":       integer,
     "float":         float,
     "str":           str,
+    "null":          null_conversion,
     "locale":        MemoizedConversion(check_locale).convert,
     "port-number":   RangeCheckedConversion(int, min=1, max=0xffff).convert,
     "basic-key":     BasicKeyConversion().convert,