New submission from djc:

>>> urllib.quote(['', 'aa'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/urllib.py", line 1205, in quote
    res = map(safe_map.__getitem__, s)
KeyError: ''

I think this is a weird error message to throw. quote() is obviously
assuming that the param passed is a one-character string iterator or
something. It should either accept just strings or come up with a better
error message when confronted with an iterator element that is not a
one-character string, IMO.

----------
components: Library (Lib)
messages: 62978
nosy: djc
severity: minor
status: open
title: urllib.quote() throws KeyError when passed an iterator
versions: Python 2.5

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2189>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to