On Feb 10, 2:09 pm, kj <no.em...@please.post> wrote:
> Some people have mathphobia.  I'm developing a wicked case of
> Unicodephobia.
> [snip]

Some general advice (Looks like I am reiterating what MRAB said -- I
type slower :):

1. If possible, use unicode strings for everything.  That is, don't
use both str and unicode within the same project.

2. If that isn't possible, convert strings to unicode as early as
possible, work with them that way, then convert them back as late as
possible.

3. Know what type of string you are working with!  If a function
returns or accepts a string value, verify whether the expected type is
unicode or str.

4. Consider switching to Python 3.x, since there is only one string
type (unicode).

--
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to