From: Alan G I. <ai...@am...> - 2008-07-22 19:41:54
|
On Tue, 22 Jul 2008, David Goodger apparently wrote: > If 2to3 can handle the differences, we shouldn't be > messing with working code for no good reason. OK. So that eliminates almost all the changes, I believe. Two exceptions: 1. use of the ``UserString`` module Using the rule above, it seems the simple, fast, and safe way it to to make a local of ``UserString`` and import it (relatively). (Note: simply inheriting from ``str`` instead does not work.) Is this the right answer for now? 2. Lines like:: if self.encoding and self.encoding.lower() == 'unicode': should become (am I right?):: if self.encoding and self.encoding.lower() in ('unicode','utf-8'): Alan |