Skip to content

Conversation

@lgeiger
Copy link
Contributor

@lgeiger lgeiger commented Nov 4, 2024

This is a docs-only change that updates the examples to use map(..., strict=True) instead of starmap(..., zip(..., strict=True)) which should improve readability.


📚 Documentation preview 📚: https://cpython-previews--126407.org.readthedocs.build/

@bedevere-app
Copy link

bedevere-app bot commented Nov 4, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@terryjreedy terryjreedy added the docs Documentation in the Doc dir label Nov 4, 2024
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Example:

>>> p=[1,2,3]
>>> q=[4,5,6]
>>> import math
>>> math.sumprod(p, q)
32
>>> import itertools, operator
>>> sum(itertools.starmap(operator.mul, zip(p, q, strict=True)))
32
>>> sum(map(operator.mul, p, q))
32

@vstinner vstinner merged commit 3d4fda2 into python:main Nov 5, 2024
54 checks passed
@lgeiger lgeiger deleted the map-strict-docs branch November 5, 2024 09:57
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants