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 — gh-119793: Add optional length-checking to `map()` by nineteendo · Pull Request #120471 · python/cpython

Conversation

@nineteendo

@nineteendo nineteendo commented Jun 13, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

These two examples silently truncate the unmatched inputs:

>>> list(map(pow, [1, 2, 3], [2, 2, 2, 2]))
[1, 4, 9]
>>> list(map(pow, [1, 2, 3, 4, 5], [2, 2, 2, 2]))
[1, 4, 9, 16]
  • Issue: Add a "strict" option for map() #119793

📚 Documentation preview 📚: library/functions.html#map

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nineteendo
Add strict argument
06fdd71
@bedevere-app bedevere-app Bot mentioned this pull request Jun 13, 2024
Add a "strict" option for map() #119793
Closed
nineteendo
nineteendo commented Jun 13, 2024
View reviewed changes
Comment thread Lib/test/test_itertools.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

blurb-it Bot and others added 2 commits June 13, 2024 19:12
@blurb-it
📜🤖 Added by blurb_it.
a7966f8
@nineteendo
Add tests
89e25d9
@nineteendo
nineteendo marked this pull request as ready for review June 13, 2024 19:45
@nineteendo
nineteendo requested review from ericsnowcurrently and rhettinger as code owners June 13, 2024 19:45
@bedevere-app bedevere-app Bot added the awaiting review label Jun 13, 2024
@nineteendo
Update commented out code
a48ebcf
nineteendo
nineteendo commented Jun 13, 2024
View reviewed changes
Comment thread Lib/test/test_builtin.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

nineteendo added 2 commits June 13, 2024 21:55
@nineteendo
Update docs
e4ee2fb
@nineteendo
Fix __reduce__()
bdd0fcb
eendebakpt
eendebakpt reviewed Jun 13, 2024
View reviewed changes
Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

nineteendo added 5 commits June 14, 2024 09:01
@nineteendo
Revert map_vectorcall()
91a8450
@nineteendo
Reduce diff
2c7d524
@nineteendo
Never set
5ad7eb2
@nineteendo
Reduce diff 2
6d8584b
@nineteendo
Fixed undefined variable
e436a2b
picnixz
picnixz reviewed Jun 14, 2024
View reviewed changes
Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_builtin.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nineteendo @picnixz
Apply suggestions from code review
f9a2a49
Co-authored-by: Bénédikt Tran <[email protected]>
nineteendo
nineteendo commented Jun 14, 2024
View reviewed changes
Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nineteendo
Merge branch 'main' into strict-map
800ac10
@nineteendo

nineteendo commented Jun 19, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@rhettinger, thoughts? You requested this. Or do you want someone else to review it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nineteendo added 3 commits June 19, 2024 16:22
@nineteendo
Update 2024-06-13-19-12-49.gh-issue-119793.FDVCDk.rst
301da5d
@nineteendo
Update whatsnew
fb1c379
@nineteendo
Fix pr number
255e3a2
nineteendo
nineteendo commented Jun 19, 2024
View reviewed changes
Comment thread Doc/whatsnew/3.14.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

nineteendo added 2 commits June 19, 2024 16:35
@nineteendo
Fix signature
d1c1769
@nineteendo
Add comment
6d20976
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Oct 30, 2024
@nineteendo

nineteendo commented Oct 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Thanks Petr, do you know someone besides Brandt and Reymond that might want to review this? I think it would be best to have more than 1 approval.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Oct 31, 2024

Copy link
Copy Markdown
Member

It would, but if no one finds the time, I plan to merge it next week.

nineteendo reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eendebakpt
eendebakpt reviewed Oct 31, 2024
View reviewed changes
Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

nineteendo and others added 2 commits October 31, 2024 13:19
@nineteendo @eendebakpt
Update Python/bltinmodule.c
bf7f350
Co-authored-by: Pieter Eendebak <[email protected]>
@nineteendo
Rename 2024-06-13-19-12-49.gh-issue-119793.FDVCDk.rst to 2024-06-13-1…
9cc41f2
…9-12-49.gh-issue-119793.FDVCDk.rst
erlend-aasland
erlend-aasland reviewed Oct 31, 2024
View reviewed changes
Comment thread Doc/whatsnew/3.14.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Core_and_Builtins /2024-06-13-19-12-49.gh-issue-119793.FDVCDk.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

nineteendo and others added 5 commits October 31, 2024 15:04
@nineteendo
Fix shadowed variable
f686101
@nineteendo @erlend-aasland
Apply suggestions from code review
e524e17
Co-authored-by: Erlend E. Aasland <[email protected]>
@nineteendo
Rename 2024-06-13-19-12-49.gh-issue-119793.FDVCDk.rst to 2024-06-13-1…
91bdf2f
…9-12-49.gh-issue-119793.FDVCDk.rst
@nineteendo
Use same message for news.d
39c34f1
@nineteendo @erlend-aasland
Update Doc/whatsnew/3.14.rst
ea65b2c
Co-authored-by: Erlend E. Aasland <[email protected]>
@nineteendo

nineteendo commented Oct 31, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Erlend, your remaining suggestions also apply to zip(), as the code was copied. What do you suggest I do?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

picnixz
picnixz reviewed Oct 31, 2024
View reviewed changes
Comment thread Doc/whatsnew/3.14.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Core_and_Builtins/2024-06-13-19-12-49.gh-issue-119793.FDVCDk.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Core_and_Builtins/2024-06-13-19-12-49.gh-issue-119793.FDVCDk.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_builtin.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

nineteendo and others added 6 commits October 31, 2024 18:16
@nineteendo @picnixz
Apply suggestions from code review
45c2d0d
Co-authored-by: Bénédikt Tran <[email protected]>
@nineteendo
Sync with what's new
ad6c2a5
@nineteendo
Accept truthy value in setstate
9ebc398
@nineteendo
Fix removed line
d829a17
@nineteendo
Use stdbool
d1d858f
@nineteendo
Revert "Use stdbool"
f23caa5
This reverts commit d1d858f.
rhettinger
rhettinger approved these changes Oct 31, 2024
View reviewed changes
Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/bltinmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nineteendo @erlend-aasland
Apply suggestions from code review
7e32e2c
Co-authored-by: Erlend E. Aasland <[email protected]>
erlend-aasland
erlend-aasland approved these changes Nov 1, 2024
View reviewed changes
@erlend-aasland erlend-aasland changed the title gh-119793: Add Optional Length-Checking To map() gh-119793: Add optional length-checking to map() Nov 1, 2024
@encukou
encukou merged commit 3032fcd into python:main Nov 4, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Nov 4, 2024
@nineteendo
nineteendo deleted the strict-map branch November 4, 2024 15:35
picnixz added a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
@nineteendo @picnixz
@eendebakpt @erlend-aasland @rhettinger
pythongh-119793: Add optional length-checking to map() (pythonGH-12…
402ab10
…0471)


Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Pieter Eendebak <[email protected]>
Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Raymond Hettinger <[email protected]>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
@nineteendo @picnixz
@eendebakpt @erlend-aasland @rhettinger @ebonnal
pythongh-119793: Add optional length-checking to map() (pythonGH-12…
12ae762
…0471)


Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Pieter Eendebak <[email protected]>
Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Raymond Hettinger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@eendebakpt eendebakpt eendebakpt left review comments
@picnixz picnixz picnixz left review comments
@encukou encukou encukou approved these changes
@rhettinger rhettinger rhettinger approved these changes
@erlend-aasland erlend-aasland erlend-aasland approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@nineteendo @encukou @eendebakpt @rhettinger @picnixz @erlend-aasland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — 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.