Mercurial > cpython-lru_cache-weakref
diff Lib/json/decoder.py @ 82301:36220cf535aa 3.2
Issue #17225: JSON decoder now counts columns in the first line starting
with 1, as in other lines.
| author | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| date | Thu, 21 Feb 2013 20:19:16 +0200 |
| parents | 9854520c8200 |
| children | 40c36d873f41 361ba6d4b7c9 |
line wrap: on
line diff
--- a/Lib/json/decoder.py Thu Feb 21 14:34:36 2013 +0200 +++ b/Lib/json/decoder.py Thu Feb 21 20:19:16 2013 +0200 @@ -32,7 +32,7 @@ newline = '\n' lineno = doc.count(newline, 0, pos) + 1 if lineno == 1: - colno = pos + colno = pos + 1 else: colno = pos - doc.rindex(newline, 0, pos) return lineno, colno
