Skip to content

tokenize does not include Other_ID_Start or Other_ID_Continue in identifier #71030

Closed

Description

@JoshuaLandau
BPO 26843
Nosy @serhiy-storchaka
Superseder
  • bpo-24194: Make tokenize recognize Other_ID_Start and Other_ID_Continue chars
  • 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 2016-04-25.06:05:00.047>
    created_at = <Date 2016-04-25.01:58:44.136>
    labels = ['type-bug', 'library']
    title = 'tokenize does not include Other_ID_Start or Other_ID_Continue in identifier'
    updated_at = <Date 2016-04-25.08:03:59.612>
    user = 'https://bugs.python.org/JoshuaLandau'

    bugs.python.org fields:

    activity = <Date 2016-04-25.08:03:59.612>
    actor = 'Joshua.Landau'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-04-25.06:05:00.047>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2016-04-25.01:58:44.136>
    creator = 'Joshua.Landau'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 26843
    keywords = []
    message_count = 3.0
    messages = ['264145', '264156', '264161']
    nosy_count = 2.0
    nosy_names = ['Joshua.Landau', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '24194'
    type = 'behavior'
    url = 'https://bugs.python.org/issue26843'
    versions = ['Python 3.5']

    Activity

    1. JoshuaLandau commented on Apr 25, 2016

      JoshuaLandaumannequin
      MannequinAuthor

      This is effectively a continuation of https://bugs.python.org/issue9712.

      The line in Lib/tokenize.py

          Name = r'\w+'

      must be changed to a regular expression that accepts Other_ID_Start at the start and Other_ID_Continue elsewhere. Hence tokenize does not accept '℘·'.

      See the reference here:

      https://docs.python.org/3.5/reference/lexical_analysis.html#identifiers
      

      I'm unsure whether unicode normalization (aka the xid properties) needs to be dealt with too.

      Credit to toriningen from http://stackoverflow.com/a/29586366/1763356.

    2. added
      stdlib
      type-bug
      on Apr 25, 2016
    3. serhiy-storchaka commented on Apr 25, 2016

      @serhiy-storchaka
      Member

      This is a duplicate of bpo-24194. Yes, there is no progress still.

    4. JoshuaLandau commented on Apr 25, 2016

      JoshuaLandaumannequin
      MannequinAuthor

      Sorry, I'd stumbled on my old comment on the closed issue and completely forgot about the *last* time I did the same thing.

    5. transferred this issue fromon Apr 10, 2022
    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

      stdlibtype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions