Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

I think this a known limitation as per 
https://bugs.python.org/issue23637#msg239361 where non-ASCII characters would 
require byte string. I couldn't find the relevant documentation for it though.

$ ./python.exe
Python 2.7.15+ (remotes/upstream/2.7:69d0bc1430, Sep 24 2018, 16:02:09)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>>
>>> warnings.warn(b'blé')
__main__:1: UserWarning: blé
>>> warnings.warn(u'blé')
>>>

Thanks

----------

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

Reply via email to