A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/335772.html below:

Unbuffered flag causes SyntaxError oninteractive sessions?

Windows Python 2.4: Unbuffered flag causes SyntaxError oninteractive sessions? Windows Python 2.4: Unbuffered flag causes SyntaxError oninteractive sessions?Steve Holden steve at holdenweb.com
Thu Sep 15 05:14:51 EDT 2005
Lonnie Princehouse wrote:
> After doing some more reading, I now think this isn't a bug.
> 
> Evidently the unbuffered flag not only makes stdin unbuffered, but it
> also forces it into binary mode.  I didn't realize that when I posted
> earlier.
> 
> So the SyntaxErrors arise because the interpreter isn't converting \r\n
> into \n because stdin is binary.  Not a bug, although it would be nice
> to have an "unbuffered text mode" flag too...
> 
> D'oh.
> 
It seems a little bizarre to me that the compiler isn't prepared to 
treat carriage returns as whitespace during its tokenizations. The only 
area I would anticipate problems would be string literals containing 
end-of-line sequences embedded within triple-quotes.

It would seem to make sense to program the compiler defensively to 
ignore embedded "\r" characters.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4