GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Lexical analysis - Section 2.4.1 - More accurate description for long[string/bytes]char · Issue #110942 · python/cpython

Lexical analysis - Section 2.4.1 - More accurate description for long[string/bytes]char #110942

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
Lexical analysis - Section 2.4.1 - More accurate description for long[string/bytes]char#110942
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@josepojr
josepojr
opened on Oct 16, 2023
Issue body actions

Documentation

In expressions like longstringchar and longbyteschar, I will suggest changes to make it clearer and more precise.

Before:

longstringchar ::= <any source character except "\">
longbyteschar ::= <any ASCII character except "\">

After:

longstringchar ::= <any source character except "\" or triple quote>
longbyteschar ::= <any ASCII character except "\" or triple quote>

Because the tokenizer can recognize three consecutive quotes (mapped by three longstringchar or longbyteschar) which ends up becoming one triple quote (for example). This will break longstring or longbytes recognition as show below:

longstring ::= "'''" longstringitem* "'''" | '"""' longstringitem* '"""'
longbytes ::= "'''" longbytesitem* "'''" | '"""' longbytesitem* '"""'

longstringitem ::= longstringchar | stringescapeseq
longbytesitem ::= longbyteschar | bytesescapeseq

Otherwise we will have triple quotes inside the longstringitem or longbytesitem. Can this? Absolutely not.

Thank you for your attention.

José Oliveira

Reacted by Biniyam

Activity

  1. josepojr
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Oct 16, 2023
  2. StanFromIreland commented on Oct 30, 2025

    @StanFromIreland
    StanFromIreland
    on Oct 30, 2025
    Member
    More actions

    This has been fixed in 777159f

  3. StanFromIreland
    closed this as a duplicateof Reword the Lexical Analysis chapter of the docs #135676 on Oct 30, 2025
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

    docsDocumentation in the Doc dirDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.