|
From: <sub...@co...> - 2007-03-30 00:19:51
|
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):
|