[New-bugs-announce] [issue22379] Empty exception message of str.join

Yongzhi Pan report at bugs.python.org
Wed Sep 10 04:54:51 CEST 2014


New submission from Yongzhi Pan:

In the 2.7 branch, the exception message of str.join is missing when the argument is non-sequence:

>>> ' '.join(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError

I fix this with a patch. After this:

>>> ' '.join(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can only join an iterable

I also add test to this case. Can the test also be added to 3.x branches?

----------
components: ctypes
files: str_join_exception_message.diff
keywords: patch
messages: 226675
nosy: fossilet
priority: normal
severity: normal
status: open
title: Empty exception message of str.join
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file36589/str_join_exception_message.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22379>
_______________________________________


More information about the New-bugs-announce mailing list