Re: [patch] Unicode support for GTK, QT, TK
Sascha Silbe <[email protected]> Wed, 27 Aug 2003 03:15:40 +0200
| Newsgroups | gmane.comp.python.anygui.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 27, 2003 at 02:59:40AM +0200, Sascha Silbe wrote: >> unicode(object[, encoding[, errors]]) >> [...] >> New in version 2.0. Changed in version 2.2: Support for >> __unicode__() added. > So 2.1 should work for strings and maybe some basic Python types like > lists, but for complex types Python 2.2 is needed. Python 2.1 just finished installing. unicode() does only work on strings in Python 2.1, not on other types like lists: === Begin === sascha@cube:~$ python2.1 Python 2.1.3 (#1, Aug 27 2003, 02:37:56) [GCC 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)] on linux2 Type "copyright", "credits" or "license" for more information. >>> unicode([]) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: coercing to Unicode: need string or buffer, list found >>> === End === My code has been tested under Python 2.2.3/Linux/x86, so Python 2.2 should suffice, at least on modern unices. CU/Lnx Sascha -- Registered Linux User #77587 (http://counter.li.org/) bomb terrorist afghanistan PGP encrypt CIA FBI BND MAD StaSi anschlag strike sex pussy xxx kill bj hitler Gates MS Windows ZV ZDV
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/TAY7Fu2Z2HTlz4cRAgWoAKC25NXyfofZpL4ReJiXJgKvAsxJAgCghYF+ PSQXM2WJeT5ujNUM5tM2eeM= =8an2 -----END PGP SIGNATURE-----