Python's 8-bit cleanness deprecated?

Paul Rubin phr-n2003b at NOSPAMnightsong.com
Wed Feb 5 14:13:56 EST 2003


Brian Quinlan <brian at sweetapp.com> writes:
> > I think it's more in the Python tradition (although this particular
> > tradition is one that I don't like) to use a variable:
> > 
> > __encoding__ = "latin-1"
> 
> It has to be a bit more special than that because the encoding must be
> detected before the grammar is parsed. Variable assignment would be
> acceptable, I guess, except that the assignment:
> 
> 1. would have to use a simplified grammar
> 2. it would have to be near the top of the file

Yes, there are similar constraints for "from __future__" declarations.
This would be similar.




More information about the Python-list mailing list