homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ishimoto
Recipients M..Z., amaury.forgeotdarc, flox, georg.brandl, ishimoto, pitrou, vstinner
Date 2012年08月03日.04:44:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343969069.44.0.139552793625.issue13119@psf.upfronthosting.co.za>
In-reply-to
Content
On Fri, Aug 3, 2012 at 5:16 AM, STINNER Victor <report@bugs.python.org> wrote:
>> I wonder why "print(1, file=sys.stderr)" returns '1' instead of '1\n'.
>
> I suppose that you mean "returns '1\n' instead of '1'". 
No, sorry for my lame wording.
In the test I submitted, printing to stdout with 
 
 "print(1, file=sys.stdout);print(2, file=sys.stdout)"
outputs
 "1\r\n2\r\n"
but printing to stderr with 
 "print(1, file=sys.stderr);print(2, file=sys.stderr)" 
outputs
 "1\r\n2" <- no '\r\n' at the end
I wondered why, but this is not specific to Python 3. 
With Python 2.7 
 print >>sys.stderr, 1
doesn't output '\r\n' at the end also. So I think this may 
not be a bug.
History
Date User Action Args
2012年08月03日 04:44:29ishimotosetrecipients: + ishimoto, georg.brandl, amaury.forgeotdarc, pitrou, vstinner, flox, M..Z.
2012年08月03日 04:44:29ishimotosetmessageid: <1343969069.44.0.139552793625.issue13119@psf.upfronthosting.co.za>
2012年08月03日 04:44:28ishimotolinkissue13119 messages
2012年08月03日 04:44:28ishimotocreate

AltStyle によって変換されたページ (->オリジナル) /