Skip to content

ast.parse produces wrong lineno and col_offset for triple-quoted strings #62570

@aivarannamaa

Description

@aivarannamaa
BPO 18370
Nosy @aivarannamaa
Superseder
  • bpo-16806: col_offset is -1 and lineno is wrong for multiline string expressions
  • Files
  • col_offset_bug.py: reproduces the bug
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2013-07-06.09:44:32.541>
    created_at = <Date 2013-07-05.20:24:05.916>
    labels = ['interpreter-core', 'type-bug']
    title = 'ast.parse produces wrong lineno and col_offset for triple-quoted strings'
    updated_at = <Date 2013-07-06.16:51:43.181>
    user = 'https://github.com/aivarannamaa'

    bugs.python.org fields:

    activity = <Date 2013-07-06.16:51:43.181>
    actor = 'brett.cannon'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-07-06.09:44:32.541>
    closer = 'Aivar.Annamaa'
    components = ['Interpreter Core']
    creation = <Date 2013-07-05.20:24:05.916>
    creator = 'Aivar.Annamaa'
    dependencies = []
    files = ['30784']
    hgrepos = []
    issue_num = 18370
    keywords = []
    message_count = 3.0
    messages = ['192355', '192359', '192395']
    nosy_count = 1.0
    nosy_names = ['Aivar.Annamaa']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '16806'
    type = 'behavior'
    url = 'https://bugs.python.org/issue18370'
    versions = ['Python 3.1', 'Python 3.2', 'Python 3.3']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
      No fields configured for issues without a type.

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions