[Python-Dev] Toby Dickenson's Unicode experience

Guido van Rossum guido@beopen.com
Fri, 07 Jul 2000 07:29:27 -0500

He's got a point...

Maybe add ustr(x) with the semantics below?

--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)

------- Forwarded Message

Date:    Fri, 07 Jul 2000 10:53:39 +0100
From:    Toby Dickenson <mbel44@dial.pipex.net>
To:      I18n-sig@python.org
Subject: [I18n-sig] Unicode experience

I'm just nearing the end of getting Zope to play well with unicode
data. Most of the changes involved replacing a call to str, in
situations where either a unicode or narrow string would be

My best alternative is:

def convert_to_something_stringlike(x):
    if type(x)==type(u''):
        return x
        return str(x)

This seems like a fundamental operation - would it be worth having
something similar in the standard library?

Toby Dickenson

I18n-sig mailing list

------- End of Forwarded Message