On 11/14/06, Bernd Dorn <[EMAIL PROTECTED]> wrote:
i just saw that zope.schema.Date objects accept datetime values
because the default validate implementation uses isinstance to check
the value. this is a problem imho, because datetime is a subclass of
date but instances can't be compmared to each other.


Agreed.

any problems with this? and if no, is it ok to backport it to 3.3

I don't know.  It seems like a bug to me, but I'm no bastion of
backward-compatibility.

i also tried using type instead of instance in the base
implementation of the validate method, but this affects i18n
messages, because they are not unicode.

The implementation is sensitive, I suppose.  The patch you include
looks fine to me.


 -Fred

--
Fred L. Drake, Jr.    <fdrake at gmail.com>
"Every sin is the result of a collaboration." --Lucius Annaeus Seneca
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to