Skip to content

SystemError: Objects/codeobject.c bad argument to internal function #140564

@YuanchengJiang

Description

@YuanchengJiang

Crash report

What happened?

c = (lambda x, y, *, z=1, w=1: 1).__code__
swapped = c.replace(co_posonlyargcount=2147483647, co_kwonlyargcount=0)

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions