Bugs item #1378305, was opened at 2005-12-11 21:09 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378305&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parser/Compiler Group: Python 2.4 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Guenter Jantzen (gjantzen) Assigned to: Nobody/Anonymous (nobody) Summary: Import value 1e400 from pyc fails Initial Comment: ------------------------------------------- #file: bug.py #sys.version_info (2, 4, 2, 'final', 0) #Platform is Windows XP import sys, bug infinity = 1e400 if __name__ == "__main__": import bug print "Infinity is", bug.infinity ------------------------------------------ This code behaves correct using bug.py - when bug.pyc is not up to date / not exists: Infinity is 1.#INF and behaves wrong using bug.pyc - when bug.pyc is up to date: Infinity is 1.0 ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2007-03-19 16:30 Message: Logged In: YES user_id=849994 Originator: NO Fixed, then. ---------------------------------------------------------------------- Comment By: Sean Gillespie (sean_gillespie) Date: 2007-03-19 13:24 Message: Logged In: YES user_id=1744567 Originator: NO This does indeed seem to be fixed in Python2.5. I was able to reproduce this with Python2.4 with similar results (Windows XP again). However, in Python2.5, the results are as expected. Python24: > python.exe bug.pyc Infinity is 1.0 Python25: > python.exe bug.pyc Infinity is 1.#INF ---------------------------------------------------------------------- Comment By: Josiah Carlson (josiahcarlson) Date: 2005-12-14 06:10 Message: Logged In: YES user_id=341410 This is a known bug with Python and floating point infinity literals. You can use: infinity = 1e155 * 1e155 I believe this is fixed in the latest Python 2.5 SVN. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378305&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com