R. David Murray <rdmur...@bitdance.com> added the comment:

No, because my code is a backward compatibility hack.  Currently if someone is 
passing a default successfully they must be doing it by passing in a list or 
tuple consisting of one or more strings.  So your code would result in 
something like:

  >>> ', '.join([str(['abc'])])
  "['abc']"

However, you are correct that if default is some object other than a list, it 
is either going to work in the ', ' or it isn't, so there's no need to call 
list on it.  So my code should be simplified to:

    if isinstance(default, string):
       default = [default]
    return ', '.join(self.headers_get_all(name, default))

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8572>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to