[issue25326] Improve error message for "character buffer objects"

Raymond Hettinger report at bugs.python.org
Tue Oct 6 12:46:13 EDT 2015


New submission from Raymond Hettinger:

Python 2.7.10+ (2.7:fc6d62db8d42+, Oct  6 2015, 11:55:10) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> s = 'the tale of two cities'
>>> s.count(('a', 'z'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected a character buffer object (such as a string)

   new text ---------------------------------^^^^^^^^^^^^^^^^^^^

----------

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


More information about the Python-bugs-list mailing list