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

R. David Murray report at bugs.python.org
Mon Aug 2 02:37:35 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Joining the iterator contents if default is an iterator is an ugly backward compatibility hack.  The default should really be returned unchanged.  But given there is code in the field working around the current bug, I guess we have to retain it.  Of course, it will fail if the iterator contains non-strings...oh well.

Perhaps we could add a deprecation warning when an iterator is used as a default, and in 3.3 stop special casing iterators.

And I agree that only iterators should be special cased, since anything else would currently be failing, and should instead be returned unchanged.

----------

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


More information about the Python-bugs-list mailing list