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 security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy