[Python-3000] struni and the Apple four-character-codes

Bob Ippolito bob at redivi.com
Fri Jul 27 17:47:24 CEST 2007


On 7/27/07, Guido van Rossum <guido at python.org> wrote:
> On 7/26/07, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
> > On 7/26/07, Guido van Rossum <guido at python.org> wrote:
> > > (Personally
> > > I'd like to use strings for the keys since {'TEXT': 'stuff'} is a lot
> > > clearer than {1413830740: 'stuff'} when encountered in a debugging
> > > session.)
> >
> > Good argument. You now have a patch that uses str() instead of b2i().
>
> Hmm... That only works as long as the bytes are ASCII. Is that a
> problem for aepack? Or are all its 4CCs chosen from a well-known set
> that's all-ASCII?

4CCs are not all ASCII, they're Mac OS Roman. This is why in some of
the C header files the constants turned into integers.

-bob


More information about the Python-3000 mailing list