jrivers0 · GitHub

Bug report

Bug description:

def f(a=0):
    f(a=0)
f()

This code causes an infinite loop (until it runs out of memory) in Python 3.14. It raises RecursionError in Python 3.13. There is no problem when calling the function without a keyword argument; in that case, it also raises RecursionError as expected.

CPython versions tested on:

3.13, 3.14, CPython main branch

Operating systems tested on:

macOS

Linked PRs

Read the original on github.com ↗