[issue8572] httplib getheader() throws error instead of default

Walter Woods report at bugs.python.org
Thu Apr 29 23:13:19 CEST 2010


Walter Woods <woodswalben at gmail.com> added the comment:

couchdb-python makes http requests, yes.  

Passing in a number might be mildly inappropriate, BUT I'd like to point out that the default might be used to find out if the header is not set (hence its default value of None).  

It should not assume that a string is the proper input; any sentinel value should work (especially as python is dynamic, and the default parameter is not actually used for the function's logic).

Which goes back to the original patch, unless a list or tuple is provided, in which case the list is comma joined for backwards compatibility as suggested by David.

----------

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


More information about the Python-bugs-list mailing list