Content-Length: 293905 | pFad | https://github.com/python/cpython/issues/136801

EC Repl syntax highlighting fails in pattern matching when the previous case spans across multiple lines · Issue #136801 · python/cpython · GitHub
Skip to content

Repl syntax highlighting fails in pattern matching when the previous case spans across multiple lines #136801

@olgarithms

Description

@olgarithms

Bug report

Bug description:

There is a bug in the new repl syntax highlighting when using pattern matching with cases spawning across new lines.

To reproduce:

def status(code):
    match code:
        case 0: return "OK"  # correct highlight
        case -1:                      # correct highlight
            return "Error"
        case -2:                     # no highlight
            return "Big Error"
        case _:                       # no highlight
            return "Unknown status"

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/136801

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy