[I18n-sig] PEP 263 and Japanese native encodings

M.-A. Lemburg mal@lemburg.com
Thu, 07 Mar 2002 12:22:13 +0100


Tamito KAJIYAMA wrote:
> 
> I've thought that Marc-Andre's intent for ASCII compatibility
> (i.e., ASCII compatible encodings should be able to represent
> the first two lines of comments only by ASCII characters) is
> good enough.  It appears that his requirement has no problem
> with regard to the implementation stategy described in the PEP
> (revision 1.9) *and* Japanese encodings.  IMHO, the ASCII
> compatibility simply should not impose other requirements.

I've updated the PEP to clarify this. Basically it should be
possible to do:

file = open('script.py')
line1 = file.readline()
line2 = file.readline()

# check line1 and line2 for the RE from the PEP

# push the two lines back onto the file stream or handle this
# situation using a line buffer.

Nothing complicated, really.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/