PEP263 (Specifying encoding) and bytecode strings

Mike C. Fletcher mcfletch at rogers.com
Mon May 5 03:53:04 EDT 2003


Alex Martelli wrote:
...

>>Is there some way to specify that all strings are bytecodes, and not
>>encoded characters?
>>    
>>
...

>Couldn't resourcepackage just insert a suitable encoding "declaration",
>which is after all a comment and thus innocuous for any previous
>release of Python -- or else emit non-ascii chars as escape sequences?
>  
>
Our question could be rephrased then as:

    What encoding declaration means "treat strings as streams of bytes,
    not encoded characters"?  (That is, emulate previous version's
    operation).  Or, if you prefer, what is the "unencoded encoding" called?

Regarding emitting escaped characters, it can be done, but you wind up 
with significant bloating of the files (these are binary files much of 
the time, having to include ~4 bytes for every one byte is an ungood thing).

Enjoy,
Mike

_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/








More information about the Python-list mailing list