Python 2.7.5: Strange and differing behavior depending onsys.setdefaultencoding being set

  • Thread starter Hans-Peter Jansen
  • Start date
H

Hans-Peter Jansen

Hi,

I'm experiencing strange behavior with attached code, that differs depending
on sys.setdefaultencoding being set or not. If it is set, the code works as
expected, if not - what should be the usual case - the code fails with some
non-sensible traceback.

I tried to boil it down to a comprehensible state, but some LOC are still
involved. I use similar code to represent database records, where the repr's
appear in user visible logs for example.

It is greatly appreciated, if some kind soul could shed some light on this
ungrateful behavior.

Thanks in advance,
Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top