>> 1. read input into a buffer
>> 2. determine source encoding (looking at a BOM, else a
>>    declaration within the first two lines, else default
>>    to UTF-8)
>> 3. if the source encoding is not UTF-8, pass it through
>>    a codec (decode to string, encode to UTF-8). Otherwise,
>>    check that all bytes are really well-formed UTF-8.
>> 4. start parsing
> 
> So people could hook into their own "codec" that, say, replaced native
> language keywords with standard python keywords?

No, so that PEP 263 remains implemented.

Martin
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to