Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1376)

Unified Diff: Lib/fileinput.py

Issue 15204: Deprecate the 'U' open mode
Patch Set: Created 11 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/_pyio.py ('k') | Lib/imp.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/fileinput.py Thu Jun 28 01:45:48 2012 +0200
+++ b/Lib/fileinput.py Thu Jun 28 12:21:26 2012 +0300
@@ -224,6 +224,9 @@
if mode not in ('r', 'rU', 'U', 'rb'):
raise ValueError("FileInput opening mode must be one of "
"'r', 'rU', 'U' and 'rb'")
+ if 'U' in mode:
+ warnings.warn("Use of 'U' mode is deprecated",
+ DeprecationWarning)
self._mode = mode
if openhook:
if inplace:
« no previous file with comments | « Lib/_pyio.py ('k') | Lib/imp.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7