New submission from Dirkjan Ochtman <dirk...@ochtman.nl>:

Rejecting invalid input seems better in this case. This was changed in 
issue1285086. Can we preface the normal fast path with something like:

    if s is None:
        raise TypeError('can only quote strings')

It used to raise:

    Traceback (most recent call last):
      File "/usr/lib64/python2.6/urllib.py", line 1222, in quote
        res = map(safe_map.__getitem__, s)
    TypeError: argument 2 to map() must support iteration

----------
components: Library (Lib)
messages: 110723
nosy: djc, flox, orsenthil
priority: normal
severity: normal
status: open
title: urllib.quote(None) returns None in 2.7 (raised TypeError before)
versions: Python 2.7

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

Reply via email to