Issue 14875: Unusual way of doing 'Inf' in json library (original) (raw)

Issue14875

Created on 2012-05-21 22:39 by sbermeister, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg161304 - (view) Author: Sasha B (sbermeister) Date: 2012-05-21 22:39
If you have a look at the file 'python/Lib/json/encode.py', on line 30 it says: # Assume this produces an infinity on all machines (probably not guaranteed) INFINITY = float('1e66666') FLOAT_REPR = repr Isn't float('Inf') an accepted way of doing this? Should line 31 be INFINITY = float('Inf')? Sasha
msg161306 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-05-21 23:54
New changeset c13066f752a8 by Ezio Melotti in branch '2.7': #14875: Use float('inf') instead of float('1e66666') in the json module. http://hg.python.org/cpython/rev/c13066f752a8 New changeset 06f21c6e0f2b by Ezio Melotti in branch '3.2': #14875: Use float('inf') instead of float('1e66666') in the json module. http://hg.python.org/cpython/rev/06f21c6e0f2b New changeset f5f5db593d99 by Ezio Melotti in branch 'default': #14875: merge with 3.2. http://hg.python.org/cpython/rev/f5f5db593d99
msg161307 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-05-21 23:55
Fixed, thanks for the report!
History
Date User Action Args
2022-04-11 14:57:30 admin set github: 59080
2012-05-21 23:55:13 ezio.melotti set status: open -> closedresolution: fixedmessages: + stage: resolved
2012-05-21 23:54:06 python-dev set nosy: + python-devmessages: +
2012-05-21 23:08:23 ezio.melotti set assignee: ezio.melottitype: enhancement -> behaviornosy: + ezio.melottiversions: + Python 3.2, Python 3.3
2012-05-21 22:59:36 r.david.murray set nosy: + mark.dickinson
2012-05-21 22:39:01 sbermeister create