[Python-Dev] status of development documentation

Walter Dörwald walter at livinglogic.de
Sat Dec 24 17:59:04 CET 2005


Neal Norwitz wrote:

> On 12/24/05, Tim Peters <tim.peters at gmail.com> wrote:
>
> [...]
>> >> The code up to the first failure is short:
>> >>
>> >>         bom = '\xef\xbb\xbf'
>> >>         compile(bom + 'print 1\n', '', 'exec')
>
>> That sets `a` to point at the start of the string, `b` to point at the second character, and returns type==51.  Then `len`
>> is set to 1, `str` is malloc'ed to hold 2 bytes, and `str` is filled in with
>> "\xef\x00" (the first byte of the input, as a NUL-terminated C
>> string).
>
> This gives me an idea (ie, wild ass guess).  r39680 checked in on
> 2005-10-06 to speed up unicode charmap decoding.  Dunno if it's likely or not.  Gotta run, I'm headed east.  Good luck.

Other candidates might be the patches to Parser/tokenizer.c. (Unfortunately I don't have a machine to test this right now).

Bye,
   Walter Dörwald





More information about the Python-Dev mailing list