RE: [Zope] int and string comparisons

2000-10-12 Thread Seb Bacon

if you're submitting from a form, you can coerce strings into other data
types by giving the form items special names, e.g.:




Your REQUEST then has variables called foo and bar which are ints and
floats, respectively.

also, don't post html mail - not everyone can read it.

seb.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Manuel Amador
(Rudd-O)
Sent: 12 October 2000 09:12
To: [EMAIL PROTECTED]
Subject: [Zope] int and string comparisons


This is the snippet
   


 selected 
CONVERTIR A INT


>&dtml-sequence-item;
  
The comparison fails because item is an int and REQUEST.begin_day is a
string (i guess).  How can I coerce item into a string, or REQUEST.begin_day
into an int?
 I tried python's builtin int() function around REQUEST.begin_day.  Won't
work.
Any suggestions?
--
Manuel Amador (Rudd-O)



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] int and string comparisons

2000-10-12 Thread Chris Withers

"Manuel Amador (Rudd-O)" wrote:
>  selected 

Try replacing the above with:


...and stop posting HTML to a non-HTML list!

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] int and string comparisons

2000-10-12 Thread Manuel Amador (Rudd-O)


This is the snippet
   
        
    
     selected 
CONVERTIR A INT
    
    
    >&dtml-sequence-item;
  
The comparison fails because item is an int and REQUEST.begin_day is
a string (i guess).  How can I coerce item into a string, or
REQUEST.begin_day into an int?
 I tried python's builtin int() function around REQUEST.begin_day. 
Won't work.
Any suggestions?
-- 
Manuel Amador (Rudd-O)