@@ -233,6 +233,12 @@ Core and builtins
233233- The UTF-8 codec will now encode and decode Unicode surrogates
234234 correctly and without raising exceptions for unpaired ones.
235235
236+ - Universal newlines (PEP 278) is implemented. Briefly, using 'U'
237+ instead of 'r' when opening a text file for reading changes the line
238+ ending convention so that any of '\r', '\r\n', and '\n' is
239+ recognized (even mixed in one file); all three are converted to
240+ '\n', the standard Python line end character.
241+
236242- file.xreadlines() now raises a ValueError if the file is closed:
237243 Previously, an xreadlines object was returned which would raise
238244 a ValueError when the xreadlines.next() method was called.
@@ -463,8 +469,10 @@ Build
463469 doc strings from the builtin functions and modules; this reduces the
464470 size of the executable.
465471
466- - XXX WITH_UNIVERSAL_NEWLINES Somebody fill this in; the PEP doesn't
467- say how or when to configure it, or how to turn it off.
472+ - The universal newlines option (PEP 278) is on by default. On Unix
473+ it can be disabled by passing --without-universal-newlines to the
474+ configure script. On other platforms, remove
475+ WITH_UNIVERSAL_NEWLINES from pyconfig.h.
468476
469477- On Unix, a shared libpython2.3.so can be created with --enable-shared.
470478
0 commit comments