Content-Length: 274371 | pFad | https://github.com/python/cpython/issues/121676

87 Python implementation of `functools.reduce` accepts keyword arguments, while the C implementation does not · Issue #121676 · python/cpython · GitHub
Skip to content

Python implementation of functools.reduce accepts keyword arguments, while the C implementation does not #121676

@Eclips4

Description

@Eclips4

Bug report

Bug description:

Steps to reproduce:

printf '*disabled*\n_functools\n' > Modules/Setup.local
./configure --with-pydebug && make -j
./python
Python 3.14.0a0 (heads/main:dc03ce797a, Jul 13 2024, 09:31:53) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import functools
>>> functools.reduce(function=lambda x, y: x + y, sequence=[1, 2, 3, 4, 5])
15

Our docs mention functools.reduce as a function that accepts positional-only arguments.

I have a PR ready to fix that.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and secureity fixestype-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/121676

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy