Skip to content

Line continuation of blank line emits NEWLINE #81802

Closed

Description

@miedzinski
BPO 37621
Nosy @miedzinski
PRs
  • bpo-37621: Don't emit NEWLINE tokens on blank line continuations #14840
  • Files
  • linecont.py
  • 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 = None
    created_at = <Date 2019-07-18.14:13:50.484>
    labels = ['interpreter-core', 'type-bug', '3.9']
    title = 'Line continuation of blank line emits NEWLINE'
    updated_at = <Date 2019-07-18.14:27:38.598>
    user = 'https://github.com/miedzinski'

    bugs.python.org fields:

    activity = <Date 2019-07-18.14:27:38.598>
    actor = 'miedzinski'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2019-07-18.14:13:50.484>
    creator = 'miedzinski'
    dependencies = []
    files = ['48488']
    hgrepos = []
    issue_num = 37621
    keywords = ['patch']
    message_count = 1.0
    messages = ['348117']
    nosy_count = 1.0
    nosy_names = ['miedzinski']
    pr_nums = ['14840']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37621'
    versions = ['Python 3.9']

    Activity

    1. miedzinski commented on Jul 18, 2019

      miedzinskimannequin
      MannequinAuthor

      Both C and Python tokenizers emit NEWLINE tokens on continued blank lines. Because of this it is possible to emit repeated NEWLINEs, which some tools don't expect to happen.

      I've attached example source file which is tokenized into 3 NEWLINE tokens in a row.

    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      on Jul 18, 2019
    3. transferred this issue fromon Apr 10, 2022
    4. lysnikolaou commented on Oct 12, 2023

      @lysnikolaou
      Member

      This is no longer relevant after the changes to the tokenizer for PEP 701, so I'm closing it.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions