[Zope] Python Function to Test for Integer Type

Peter Bengtsson mail at peterbe.com
Thu Jun 17 06:31:51 EDT 2004


> 
> The test will fail though if the floating point
> value isn't *exactly* an integer.
> 
> 
>>>>int(1)==1.000001
> 
> False
> 

Interesting::

  >>> 1==1.00000000000000001
  True
  >>> 1==1.000000000000001
  False
  >>>

> Cheers,
> Terry
> 
> --
> Terry Hancock ( hancock at anansispaceworks.com )
> Anansi Spaceworks  http://www.anansispaceworks.com
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 
> .
> 

-- 
Peter Bengtsson, http://www.peterbe.com



More information about the Zope mailing list