New submission from Irit Katriel <iritkatr...@gmail.com>:

Is there a reason for this raising, catching and reraising the exception here:

https://github.com/python/cpython/blob/main/Lib/urllib/parse.py#L934


rather than just:

if len(query) and not isinstance(query[0], tuple):
    raise TypeError("not a valid non-string sequence "
                    "or mapping object")

?

----------
components: Library (Lib)
messages: 411583
nosy: iritkatriel, orsenthil
priority: normal
severity: normal
status: open
title: Review exception handling in urllib.parse
type: enhancement
versions: Python 3.11

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

Reply via email to