This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年02月25日 12:09 by djc, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg62978 - (view) | Author: Dirkjan Ochtman (djc) * (Python committer) | Date: 2008年02月25日 12:09 | |
>>> 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. |
|||
| msg63010 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2008年02月25日 22:41 | |
Does something in the docs lead you to believe urllib.quote should accept a list of strings? The stdlib tends to shun type-checking to make cleaner and faster code, and let the client get exceptions like these. |
|||
| msg64141 - (view) | Author: Sean Reifschneider (jafo) * (Python committer) | Date: 2008年03月20日 03:27 | |
Yeah, I'm going to agree that urllib's documentation is clear about it taking a string instead of a list. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:31 | admin | set | github: 46442 |
| 2008年03月20日 03:27:16 | jafo | set | status: open -> closed nosy: + jafo messages: + msg64141 priority: normal assignee: jafo type: behavior resolution: wont fix |
| 2008年02月25日 22:41:25 | benjamin.peterson | set | nosy:
+ benjamin.peterson messages: + msg63010 |
| 2008年02月25日 12:09:48 | djc | create | |