Skip to content

urllib.parse.urlparse output named tuples description is wrong for Python 3.9 and 3.10 #91708

Closed
@dnicolodi

Description

The documentation for urllib.parse.urlparse states that:

The return value is a named tuple, which means that its items can be accessed by index or as named attributes, which are:

Attribute Index Value Value if not present
...
params 3 No longer used always an empty string

However it seems that the documentation does not reflect reality:

>>> 
>>> import urllib.parse
>>> p = urllib.parse.urlparse('http://foo.test/test;param')
>>> p
ParseResult(scheme='http', netloc='foo.test', path='/test', params='param', query='', fragment='')
>>> p[3]
'param'

and the returned named tuple has a populated params field.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions