Re: validators.All

"Brian Bird" <Brian.Bird-CJf51mobArP9X/uwxB7CKgC/[email protected]> Wed, 25 Jun 2008 10:53:39 +0100
Newsgroups gmane.comp.python.formencode
Message-ID <[email protected]>
Thanks - that looks like the same thread I found previously on
sourceforge.

However, the conclusion was that there is "unnecessary cleverness" and
further investigation seems to suggest this problem exists for all
Compound Validators (including those used by the MultipleSelectionField
in TurboGears) and for all attributes to do with empty cases (if_empty,
empty_value, if_missing and not_empty)

Therefore is there anything likely to be done about this or is this
behaviour supposed to happen?

Brian

> -----Original Message-----
> From: formencode-discuss-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:formencode-
> discuss-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Leandro Lucarella
> Sent: 24 June 2008 17:46
> To: formencode-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: Re: [FE-discuss] validators.All
> 
> Brian Bird, el 24 de junio a las 15:41 me escribiste:
> >    I've just started using TurboGears which uses formencode a lot -
and
> I
> >    came across some unexpected behaviour with the validators.All
> compound
> >    validator.
> >
> >
> >
> >    I would have expected the following validators to be equivalent:
> >
> >
> >
> >    >>> print validators.String(if_empty="EMPTY").to_python("")
> >
> >    EMPTY
> >
> >    >>> print
> >    validators.All(validators.String(if_empty="EMPTY")).to_python("")
> >
> >    None
> 
> See this thread (about 10 days ago):
> http://permalink.gmane.org/gmane.comp.python.formencode/507
> 
> --
> Leandro Lucarella (luca) | Blog colectivo:
> http://www.mazziblog.com.ar/blog/
>
------------------------------------------------------------------------
--
> --
> GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
>
------------------------------------------------------------------------
--
> --
> Forgive your enemies, but never forget their names
> 
> 
>
------------------------------------------------------------------------
-
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> FormEncode-discuss mailing list
> FormEncode-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/formencode-discuss

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php