[issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter

2018-05-30 Thread R. David Murray
Change by R. David Murray : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter

2018-05-30 Thread Abhilash Raj
Change by Abhilash Raj : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter

2018-05-30 Thread Abhilash Raj
Abhilash Raj added the comment: Ah! But blank lists aren't. That makes sense! Thank you! -- ___ Python tracker ___ ___ Python-bugs

[issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter

2018-05-30 Thread R. David Murray
R. David Murray added the comment: It would be odd to do that, since blank values are kept by default. -- ___ Python tracker ___ __

[issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter

2018-05-30 Thread Abhilash Raj
Abhilash Raj added the comment: Would it then make sense to add a similar flag, keep_blank_values, in urlencode to achieve similar behavior as parse_qas? -- ___ Python tracker __

[issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter

2018-05-29 Thread R. David Murray
R. David Murray added the comment: If a sequence as a value means repeated instances of a key with each value from the list, then logically an empty list means no instances of the key, as documented. Blank values aren't really part of the standard (such as it is): the absence of a parameter

[issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter

2018-05-29 Thread Abhilash Raj
New submission from Abhilash Raj : When using `urllib.parse.urlencode` it is impossible to pass an empty list when doseq=True. So, I see the following behavior when using urlencode: In [3]: urlencode({'key': ['value']}, doseq=True) Out[3]: 'key=value' In [4]: urlencode({'key': []}, doseq=Tru