[Python-Dev] cpython (3.2): Fix closes Issue12676 (original) (raw)

[Python-Dev] cpython (3.2): Fix closes Issue12676 - Invalid identifier used in TypeError message in

Antoine Pitrou solipsis at pitrou.net
Tue Aug 2 14:16:01 CEST 2011


On Tue, 02 Aug 2011 12:33:55 +0200 senthil.kumaran <python-checkins at python.org> wrote:

_raise TypeError("data should be a bytes-like object_ - or an iterable, got %r " % type(it)) + or an iterable, got %r " % type(data))

There are still a lot of spaces in your message. You should use string literal concatenation instead:

            raise TypeError(
                    "data should be a bytes-like object "
                    "or an iterable, got %r"
                    % type(data))


More information about the Python-Dev mailing list