From: Alastair Tse <liquidx@gentoo.org>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] python-2.3.2-r2 changes
Date: Sat, 22 Nov 2003 23:33:41 +0000 [thread overview]
Message-ID: <1069544021.2893.40.camel@huggins.eng.cam.ac.uk> (raw)
In-Reply-To: <20031122210820.GD17515@time>
[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]
On Sat, 2003-11-22 at 21:08, Aron Griffis wrote:
> Could you give a quick run-down on the difference between UCS2 and UCS4
> and what this change buys us? If it's been discussed in a thread which
> I missed, a pointer to the archived thread would be sufficient.
>
This was the initial thread:
http://article.gmane.org/gmane.linux.gentoo.devel/13751
Anyway, just a quick run down. Basically, Gentoo's python-2.2 used UCS2
as default for the unicode internal representation. That means using a
16bit word for each unicode character. There were bugs with 2.2's UCS4
implementation though. They have been fixed in 2.3 and it is mature
enough to be used as standard.
UCS4 is pretty popular standard for implementing unicode. For example,
glib has no UCS2 support and only supports UCS4. Another reason for
sticking with UCS4 is that it is recommended by the Python devs and is
being adopted by the other distros like Redhat (>=9) and Debian
(unstable)[3] for python-2.3. In fact, as far as I know, wchar in Linux
defaults to 4 bytes anyway.
I initially had doubts about UCS4 but from my tests[1], unless an
application uses unicode extensively, the memory footprint doesn't grow.
For example, emerge took pretty much the same memory (actually 160k
less).
So in the long run, I think aligning ourselves with UCS4 support in
Python will decrease the hassles in the future. For a more professional
(and detailed) treatment of the subject, you might like to read PEP261
[2].
Hope that answers your questions.
Cheers,
Alastair
[1] http://article.gmane.org/gmane.linux.gentoo.devel/13842/match=python
[2]
http://www.python.org/peps/pep-0261.html
[3] http://mail.python.org/pipermail/python-dev/2003-June/036458.html
> Thanks,
> Aron
--
Alastair 'liquidx' Tse
>> Gentoo Developer
>> http://www.liquidx.net/ | http://dev.gentoo.org/~liquidx/
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2003-11-22 23:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-22 15:11 [gentoo-dev] python-2.3.2-r2 changes Alastair Tse
2003-11-22 21:08 ` Aron Griffis
2003-11-22 23:33 ` Alastair Tse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1069544021.2893.40.camel@huggins.eng.cam.ac.uk \
--to=liquidx@gentoo.org \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox