Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url variable in urllib._urlsplit should be path #126376

Closed
KentaroJay opened this issue Nov 3, 2024 · 2 comments
Closed

url variable in urllib._urlsplit should be path #126376

KentaroJay opened this issue Nov 3, 2024 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@KentaroJay
Copy link

KentaroJay commented Nov 3, 2024

Hello Python team! I hope you're doing well.

Please take a look at the code here:

return (scheme, netloc, url, query, fragment)

The function _urlsplit is to return a tuple containing scheme, netloc, path, query, and fragment. However variable that corresponds to path is named url.

I think this is some kind of typo, I am eager to refactor this if that's the case.

Likewise, there are several lines with the same naming. I'll fix them too.

@tomasr8 tomasr8 added the stdlib Python modules in the Lib dir label Nov 3, 2024
@rruuaanng
Copy link
Contributor

rruuaanng commented Nov 4, 2024

Is it return the right value? I'm referring to URL :)
(Maybe the name isn't that important. If it's wrong, you can submit a PR.)

@serhiy-storchaka
Copy link
Member

This is a local variable and its name is irrelevant. Its name just an artifact of the early implementation.

We usually reject pure cosmetic changes.

@serhiy-storchaka serhiy-storchaka closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

4 participants