Skip to content

col_offset is -1 and lineno is wrong for multiline string expressions #61010

@carstenkleinaxn-softwarede

Description

@carstenkleinaxn-softwarede
BPO 16806
Nosy @terryjreedy, @vstinner, @benjaminp, @methane, @aivarannamaa, @asottile, @pablogsal
PRs
  • bpo-30465: Fix lineno and col_offset in fstring AST nodes #1800
  • bpo-16806: Fix lineno and col_offset for multi-line string tokens. #10021
  • bpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt #17582
  • Files
  • issue16806.diff: Test case and patch resolving the issue
  • python2.7.3.diff: Patch for Python 2.7.3
  • 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 2020-01-08.21:12:49.552>
    created_at = <Date 2012-12-29.00:08:22.621>
    labels = ['interpreter-core', '3.8', 'type-feature', '3.7']
    title = 'col_offset is -1 and lineno is wrong for multiline string expressions'
    updated_at = <Date 2020-01-08.21:12:49.539>
    user = 'https://bugs.python.org/carstenkleinaxn-softwarede'

    bugs.python.org fields:

    activity = <Date 2020-01-08.21:12:49.539>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-01-08.21:12:49.552>
    closer = 'pablogsal'
    components = ['Interpreter Core']
    creation = <Date 2012-12-29.00:08:22.621>
    creator = 'carsten.klein@axn-software.de'
    dependencies = []
    files = ['28478', '28499']
    hgrepos = []
    issue_num = 16806
    keywords = ['patch']
    message_count = 16.0
    messages = ['178444', '178445', '178452', '178483', '178614', '179096', '179097', '235448', '294339', '298016', '313126', '333537', '333538', '333544', '348010', '359632']
    nosy_count = 10.0
    nosy_names = ['terry.reedy', 'vstinner', 'benjamin.peterson', 'methane', 'carsten.klein@axn-software.de', 'Aivar.Annamaa', 'karamanolev', 'asottile', 'Anthony Sottile', 'pablogsal']
    pr_nums = ['1800', '10021', '17582']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue16806'
    versions = ['Python 3.7', 'Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions