Skip to content

[pull] main from python:main#349

Merged
pull[bot] merged 7 commits into
tonghuaroot:mainfrom
python:main
May 5, 2026
Merged

[pull] main from python:main#349
pull[bot] merged 7 commits into
tonghuaroot:mainfrom
python:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 5, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

sbidoul and others added 7 commits May 4, 2026 19:58
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
…eError (#146407)

When Levenshtein-based suggestions find no match for an AttributeError
on list, str, or dict, check a static table of common method names from
JavaScript, Java, C#, and Ruby.

For example, [].push() now suggests .append(), "".toUpperCase() suggests
.upper(), and {}.keySet() suggests .keys().

The list.add() case suggests using a set instead of suggesting .append(),
since .add() is a set method and the user may have passed a list where
a set was expected (per discussion with Serhiy Storchaka, Terry Reedy,
and Paul Moore).

Design: flat (type, attr) -> suggestion text table, no runtime
introspection. Only exact builtin types are matched to avoid false
positives on subclasses.

Discussion: https://discuss.python.org/t/106632

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…#149384)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
#149375)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
@pull pull Bot locked and limited conversation to collaborators May 5, 2026
@pull pull Bot added the ⤵️ pull label May 5, 2026
@pull pull Bot merged commit 8c79678 into tonghuaroot:main May 5, 2026
29 of 30 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants