[Patches] [ python-Patches-1714700 ] os.linesep needs clarification

SourceForge.net noreply at sourceforge.net
Tue May 8 04:54:23 CEST 2007


Patches item #1714700, was opened at 2007-05-07 23:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1714700&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gabriel Genellina (gagenellina)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.linesep needs clarification

Initial Comment:
On bug #1714381 (and in a message on a local Python list), people were trying to write a text file in this "portable" way:

f = open("filename","w")
f.write("Text" + os.linesep)
f.close()

Of course this is wrong, because the "portable" line terminator is just "\n", which gets converted into os.linesep by the C runtime library.

This patch adds a warning to the os.linesep documentation (and fixes a misplaced line break).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1714700&group_id=5470


More information about the Patches mailing list