diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-02-21 18:21:21 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-02-21 18:21:21 (GMT) |
commit | ed891c151748d030a890d50f3bbce3f581304439 (patch) | |
tree | 39a735381b7cd0272264e15a276aa22c00ad279f /Lib/json/decoder.py | |
parent | 9d202ba25287fca890d051abda575bf74d9cda5f (diff) | |
parent | c510a048ba4f17a82fff0a452bf9ccd29b51efc6 (diff) | |
download | cpython-ed891c151748d030a890d50f3bbce3f581304439.zip cpython-ed891c151748d030a890d50f3bbce3f581304439.tar.gz cpython-ed891c151748d030a890d50f3bbce3f581304439.tar.bz2 |
Issue #17225: JSON decoder now counts columns in the first line starting
with 1, as in other lines.
Diffstat (limited to 'Lib/json/decoder.py')
-rw-r--r-- | Lib/json/decoder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py index 07fd696..288686a 100644 --- a/Lib/json/decoder.py +++ b/Lib/json/decoder.py @@ -32,7 +32,7 @@ def linecol(doc, pos): 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 |