[issue31706] urlencode should accept generator as values for mappings when doseq=True

Serhiy Storchaka report at bugs.python.org
Fri Oct 6 03:06:27 EDT 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Extending urlencode() to accept iterables instead of just sequences of values makes sense to me. There is no principal reason of requiring sequences. But you need to update the documentation, docstrings and comments.

While we are here, we can generalize urlencode() in other aspect. Currently it accepts either mapping or a sequence of 2-tuples. It could be accept an iterable of 2-tuples (or even an iterable of 2-element sequences or 2-element iterables).

----------
nosy: +serhiy.storchaka
versions: +Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31706>
_______________________________________


More information about the Python-bugs-list mailing list