Proposal: require 7-bit source str's

Peter Otten __peter__ at web.de
Thu Aug 5 16:44:30 EDT 2004


Hallvard B Furuseth wrote:

> Now that the '-*- coding: <charset> -*-' feature has arrived,
> I'd like to see an addition:
> 
>   # -*- str7bit:True -*-
> 
>   After the source file has been converted to Unicode, cause a parse
>   error if a non-u'' string contains a non-7bit source character.

Could

# -*- coding: ascii -*-

be sufficient? Why would you reintroduce ambiguity with your s-prefixed
strings? The long-term goal would be unicode throughout, IMHO. 

Peter





More information about the Python-list mailing list