Author: ianb
Date: 2007-03-29 18:19:46 -0600 (Thu, 29 Mar 2007)
New Revision: 2478

Modified:
   FormEncode/trunk/docs/news.txt
   FormEncode/trunk/formencode/validators.py
Log:
Set if_missing=() for validators.Set

Modified: FormEncode/trunk/docs/news.txt
===================================================================
--- FormEncode/trunk/docs/news.txt      2007-03-29 04:18:38 UTC (rev 2477)
+++ FormEncode/trunk/docs/news.txt      2007-03-30 00:19:46 UTC (rev 2478)
@@ -3,6 +3,12 @@
 
 .. contents::
 
+svn trunk
+---------
+
+* Set ``if_missing=()`` on ``validators.Set``, as a missing value
+  usually means empty for this value.
+
 0.7
 ---
 

Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py   2007-03-29 04:18:38 UTC (rev 
2477)
+++ FormEncode/trunk/formencode/validators.py   2007-03-30 00:19:46 UTC (rev 
2478)
@@ -1104,6 +1104,8 @@
 
     use_set = False
 
+    if_missing = ()
+
     def _to_python(self, value, state):
         if self.use_set:
             if isinstance(value, sets.Set):


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs

Reply via email to