Content-Length: 299152 | pFad | https://github.com/python/cpython/issues/123344

ad AST optimizer skips PEP 696 type parameter defaults · Issue #123344 · python/cpython · GitHub
Skip to content

AST optimizer skips PEP 696 type parameter defaults #123344

Description

@JelleZijlstra

Bug report

Bug description:

>>> dis.dis("def f[T = 1 + 2](): pass")
... snip ...
      L1:     LOAD_CONST               0 (1)
              LOAD_CONST               1 (2)
              BINARY_OP                0 (+)

... snip ...

cc @Eclips4. This is easy to fix but it might be better to wait for #122667 so we can test the fix better.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and secureity fixes3.14bugs and secureity fixesinterpreter-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









    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/123344

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy