Movatterモバイル変換
[0]ホーム
PythonWin 2 UNIX
Steve Holdensholden at holdenweb.com
Fri Apr 6 08:02:31 EDT 2001
"Mark Hammond" <MarkH at ActiveState.com> wrote ...> Steve Holden wrote:>> > "dsavitsk" <dsavitsk at e-coli.net> wrote in message>> > Just to revisit: the only problem I have heard about CRLF causing was inthe> > #!, where the CR will be taken as part of the program name, and thePython> > interpreter file will not be found. Are you saying that UNIX flavourscannot> > ignore a carriage return? If so, it would be interesting to see suchsyntax> > error report.>> >>> compile("print 1\n", "<string>", "exec")> <code object ? at 012BBA20, file "<string>", line 1>> >>> compile("print 1\r\n", "<string>", "exec")> Traceback (most recent call last):> ...Blerch. Sorry, Mark, I could have tried that myself. Does anyone agree withme that this is a serious blot on the landscape which should be removed in2.2 and onwards?How about from __future__ import carriage_return_is_ignoredJust joking. But surely any sensible language processor could, and should,treat CR as whitespace without in any way damaging its concept of what aline is. I can see possible problems with multi-line string literals, butthey aren't parsed in the same way as other tokens anyway, right?still-won't-stop-#!name<CR>-from-not-executing-ly y'rs - steve
More information about the Python-listmailing list
[8]ページ先頭