> I saw "try: int() except:" pattern in many places through all the Zope 
> code. I think catching ValueError only does the job, but then we should 
> replace it in all the places. :-)

Yes, catching ValueError is sufficient for string conversions to int.

I thought you could get an OverflowError, but that can only happen
when the input is a Python long or float -- int("999999999999999")
raises ValueError, as does int("xxx").

--Guido van Rossum (home page: http://www.python.org/~guido/)

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

Reply via email to