Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-130578: clarify urllib.parse.quote parameter defaults behavior#130598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Mr-Sunglasses wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromMr-Sunglasses:fix/130578

Conversation

Mr-Sunglasses
Copy link
Contributor

@Mr-SunglassesMr-Sunglasses commentedFeb 26, 2025
edited by github-actionsbot
Loading

@StanFromIreland
Copy link
Contributor

Requesting@gvanrossum since you originally added this.

@gvanrossum
Copy link
Member

Sorry, I no longer do such code reviews.

Mr-Sunglasses reacted with thumbs up emoji

@vadmium
Copy link
Member

This looks like an improvement to me, although it would be more complete to explicitly allow passing None even whenstring is a byte string.

FWIW I would write something like

Ifstring is astr object,encoding anderrors specify how to deal with non-ASCII characters. Ifencoding is None, the 'utf-8' encoding is used as default. Iferrors is None, the 'strict' error handler is used as default. All otherencoding anderror values accepted bystr.encode are also allowed.

Ifstring is abytes object,encoding anderrors must be None, or a TypeError is raised.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
awaiting reviewdocsDocumentation in the Doc dirskip news
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

urllib.parse.quote is not consistent aboutencoding anderrors defaults
4 participants
@Mr-Sunglasses@StanFromIreland@gvanrossum@vadmium

[8]ページ先頭

©2009-2025 Movatter.jp