[New-bugs-announce] [issue15887] urlencode should accept generators or two elements tuples

Simonas Kazlauskas report at bugs.python.org
Sun Sep 9 12:18:57 CEST 2012


New submission from Simonas Kazlauskas:

``urllib.parse.urlencode([('i', i) for i in range(1000)])`` works, but ``urlencode(('i', i) for i in range(1000))`` raises a ``TypeError: not a valid non-string sequence or mapping object``.

Allowing urlencode to accept generators would make life a bit easier.

----------
components: Library (Lib)
messages: 170094
nosy: nagisa
priority: normal
severity: normal
status: open
title: urlencode should accept generators or two elements tuples
type: enhancement
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15887>
_______________________________________


More information about the New-bugs-announce mailing list