GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Function signature mismatch for `functools.reduce` between C implementation, Python implementation, and online documentaion · Issue #102757 · python/cpython

Function signature mismatch for functools.reduce between C implementation, Python implementation, and online documentaion #102757

New issue
Copy link
New issue
Copy link
Closed
Closed
Function signature mismatch for functools.reduce between C implementation, Python implementation, and online documentaion#102757
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@XuehaiPan
XuehaiPan
opened on Mar 16, 2023
Issue body actions

Documentation

(A clear and concise description of the issue.)

The function signature mismatch for functools.reduce:

  • C implementation:

    _initial_missing = object()
    
    @overload
    def reduce(function, iterable, /): ...
    @overload
    def reduce(function, iterable, initial=_initial_missing, /): ...
  • Python implementation:

    _initial_missing = object()
    
    @overload
    def reduce(function, sequence): ...
    @overload
    def reduce(function, sequence, initial=_initial_missing): ...

Argument change: iterable -> sequence.

  • Online documentation:

    def reduce(function, iterable, initializer=None): ...

Argument change: initial -> initializer.

Linked PRs

  • gh-102757: fix function signature mismatch for functools.reduce between code and documentation #102759

Activity

  1. XuehaiPan
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Mar 16, 2023
  2. XuehaiPan commented on Apr 14, 2023

    @XuehaiPan
    XuehaiPan
    on Apr 14, 2023
    ContributorAuthor
    More actions

    Can anyone have a look at this and my PR #102759?

  3. carljm
    added a commit that references this issue on Sep 18, 2023

    gh-102757: fix function signature mismatch for `functools.reduce` bet…

    74f315e
  4. XuehaiPan commented on Sep 18, 2023

    @XuehaiPan
    XuehaiPan
    on Sep 18, 2023
    ContributorAuthor
    More actions

    Closed via PR #102759.

  5. XuehaiPan
    closed this as completedon Sep 18, 2023
  6. csm10495
    added a commit that references this issue on Sep 28, 2023

    pythongh-102757: fix function signature mismatch for `functools.reduc…

    ebfa90b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.