Steve Holden wrote:
Ed Leafe wrote:
On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote:
It is certainly an odd restriction, but the docs for compile [1] do
explicitly state that the input must be newline terminated.
Understood; what I found odd was that if the last
non-newline-terminated statem
Ed Leafe wrote:
> On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote:
>
>> It is certainly an odd restriction, but the docs for compile [1] do
>> explicitly state that the input must be newline terminated.
>
>
> Understood; what I found odd was that if the last
> non-newline-terminated statement wa
On Oct 13, 2008, at 7:20 PM, Terry Reedy wrote:
I would prefer more consistent behavior. I have opened a separate
doc issue that includes the documentation of this issue.
http://bugs.python.org/issue4118
Again, it was not a show-stopper by any means; more of a curiosity.
Thanks for verif
Ed Leafe wrote:
On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote:
It is certainly an odd restriction, but the docs for compile [1] do
explicitly state that the input must be newline terminated.
Understood; what I found odd was that if the last
non-newline-terminated statement was *not* a com
On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote:
It is certainly an odd restriction, but the docs for compile [1] do
explicitly state that the input must be newline terminated.
Understood; what I found odd was that if the last non-newline-
terminated statement was *not* a comment, no error was
Hello Ed,
It is certainly an odd restriction, but the docs for compile [1] do
explicitly state that the input must be newline terminated.
When compiling multi-line statements, two caveats apply: line
endings must be represented by a single newline character ('\n'), and
the input must be termi
I've noticed an odd behavior with compile() and code that does not
contain a trailing newline: if the last line is a comment inside of
any block, a syntax error is thrown, but if the last line is a non-
comment Python statement, there is no error. Here's an example (using
2.5.1 on OS X)
>