[issue15887] urlencode should accept generators or two elements tuples

2012-09-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is a feature request. urlencode tries to prepare the data in the form items are submitted. It has been like form is list of key,value pairs and that's what is reflect in the current behavior. That said, I am not -1 if see if some frameworks adopting gene

[issue15887] urlencode should accept generators or two elements tuples

2012-09-10 Thread Berker Peksag
Changes by Berker Peksag : -- versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15887] urlencode should accept generators or two elements tuples

2012-09-09 Thread Simonas Kazlauskas
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 e