New submission from Jamie Bliss <ja...@ivyleav.es>:

As it says in the title. ._replace() (inherited from namedtuple) doesn't  allow 
changing the generated properties.

While this is a natural consequence of how ParseResult is implemented, I would 
describe it as a deficiency of developer experience.

My work-around function for this is 
https://gist.github.com/AstraLuma/00e511feb1f619f407d07e968d69f36b

----------
components: Library (Lib)
messages: 393614
nosy: AstraLuma
priority: normal
severity: normal
status: open
title: urllib.parse.ParseResult._replace() does not allow replacing username, 
password, hostname, port
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44127>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to