What's the value of "None" between 2.1.1 and 1.5.2
Ozone Hole near South Pole
ozonehole2k at yahoo.com
Thu Nov 29 22:07:42 EST 2001
More information about the Python-list mailing list
Thu Nov 29 22:07:42 EST 2001
- Previous message (by thread): What's the value of "None" between 2.1.1 and 1.5.2
- Next message (by thread): What's the value of "None" between 2.1.1 and 1.5.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I have written a simulation in python 1.5.2.... It used to work fine. When I logged on a new machine which has Python 2.1.1 installed, my simulation has gone wild. Later on, I figured that out one weird thing about the value of "None": In the new machine: Python 2.1.1 (#1, Nov 11 2001, 18:19:24) [GCC 2.95.4 20011006 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information. >>> a=[3,4,5,7,None,0.2,-4] >>> print min(a) None >>> print max(a) 7 Python 1.5.2 (#1, Sep 30 2000, 18:08:36) [GCC 2.95.3 19991030 (prerelease)] on linux-i386 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> a=[3,4,5,7,None,0.2,-4] >>> print min(a) -4 >>> print max(a) None >>> It seems to me that "None" means -Inf in 2.2.1 but means "Inf" in 1.5.2. Why do the Python guys change this assumption? In my calculations, I use "None" to indicate very large estimation error. Is there any formal symbol for this? I don't really want to fix this type of bug again whenever Python upgrades.... TIA
- Previous message (by thread): What's the value of "None" between 2.1.1 and 1.5.2
- Next message (by thread): What's the value of "None" between 2.1.1 and 1.5.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list