[Python-Dev] logging package vs unicode (original) (raw)
INADA Naoki songofacandy at gmail.com
Tue Aug 3 11:19:11 CEST 2010
- Previous message: [Python-Dev] co_firstlineno on decorated functions
- Next message: [Python-Dev] breaking an exception chain
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
FWIW, I think the best way to avoid UnicodeError is: Don't use chars out of ASCII in Python2. I prefer '%r' to '%s' because it escapes chars not printable or out of ASCII with backslash.
On Mon, Jul 5, 2010 at 9:34 PM, Chris Withers <chris at simplistix.co.uk> wrote:
Hi All,
The documentation for the logging package doesn't include any mention of unicode. What's the recommended usage in terms of passing unicode vs encoded strings? How does this differ from Python 2 to Python 3? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com
-- INADA Naoki <songofacandy at gmail.com>
- Previous message: [Python-Dev] co_firstlineno on decorated functions
- Next message: [Python-Dev] breaking an exception chain
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]