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

DOC:urllib.parse.urlparse() example doesn't parse theparams #129745

Open
Labels
docsDocumentation in the Doc dir
@wjandrea

Description

@wjandrea

https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse

>>>urlparse("scheme://netloc/path;parameters?query#fragment")ParseResult(scheme='scheme',netloc='netloc',path='/path;parameters',params='',query='query',fragment='fragment')

I think the problem is here (for v3.13):

if (schemeor'')inuses_paramsand';'inurl:

I assumescheme isn't a scheme thatuses_params, so the params don't get parsed out. On the other hand,https works as expected:

>>>urlparse("https://netloc/path;parameters?query#fragment")ParseResult(scheme='https',netloc='netloc',path='/path',params='parameters',query='query',fragment='fragment')

By the way, the documentation doesn't mention anything aboutuses_params. Is that an oversight? Should some mention be added?

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp