Python's 8-bit cleanness deprecated?

Jp Calderone exarkun at intarweb.us
Fri Feb 7 17:19:46 EST 2003


On Fri, Feb 07, 2003 at 09:00:48PM +0000, Simo Salminen wrote:
> * Kirill Simonov [Fri, 7 Feb 2003 18:39:56 +0200]
> > * M.-A. Lemburg <mal at lemburg.com>:
> >> No, but they'll need to pay some lucky Python programmer to get rid off
> >> the warning :-) Seriously, the warning and the trouble are intended as
> >> I already mentioned in the bug report Kirill filed on SF:
> >> http://www.python.org/sf/681960/ :
> > 
> > But what is the price that we pay for this? The millions of Python
> > scripts that use 8-bit string literals or comments are broken now in
> > order to allow the feature that no one ever used! I think that this is
> > an extreme.
> > 
> 
> I second this.
> 

  I don't.  In fact, I'm not even sure it makes sense.  Source files that
are using non-ASCII encodings are precisely the ones that this feature
benefits.  It allows anyone to look at these files and actually *read* them.

  While it's true the programs are now "broken" (They're not really, they
won't be broken until this becomes a SyntaxError, and only then if they're
run on the new version of the interpreter - They will always work on
previous versions, forever), they were "broken" before - Python source files
were previously to contain *only* ASCII text.

> This change only makes python hostile to regular programmer, who does not
> care about encodings, and only wants to use simple 8-bit characters in
> comments.
> 
> People (well, atleast me) won't start to specify encoding at the start of
> the file, because it does not buy anything. They will just stop using
> high-bit ascii characters in comments, thus decreasing the level of
> documentation.

  If you need to regularly use an encoding other than ASCII, and you cannot
configure your editor to put the appropriate text at the top of newly
created .py files, I humbly suggest that you need to find a new editor.

> 
> 
> > If you need a pythonic quote, it is here
> >     "Practicality beats purity"
> 
> Exactly. This change makes writing high-bit ASCII comments _very_
> unpractical, and breaks old code for no good reason.

  There is no such thing as high-bit ASCII.  If you don't understand the
issue, why do you think you can comment relevantly upon it?

  Jp

-- 
C/C++/Java/Perl/Python/Smalltalk/PHP/ASP/XML/Linux (User+Admin)
Genetic Algorithms/Genetic Programming/Neural Networks
Networking/Multithreading/Legacy Code Maintenance/OpenGL
See my complete resume at http://intarweb.us:8080/
-- 
 up 54 days, 1:50, 7 users, load average: 0.00, 0.04, 0.14
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030207/820b70d6/attachment.sig>


More information about the Python-list mailing list