On Sun, Mar 2, 2008 at 8:29 AM, Price Hall <[EMAIL PROTECTED]> wrote:
> I get:
>
> inf = float('inf')
> ValueError:; invalid literal for float(): inf

Right, there is no standard string representation for IEEE-754
infinities. Python currently just does whatever the system platform
does. Namely, float('inf') works on most Linux and OS X platforms and
fails on Windows. A simple cross-IEEE-754-compliant-platform way to
get inf and nan objects follows:

  inf = 1e200 * 1e200
  nan = inf / inf

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to pyglet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to