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

Unified Diff: Lib/_pyio.py

Issue 15204: Deprecate the 'U' open mode
Patch Set: Created 10 months, 4 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 | « no previous file | Lib/fileinput.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/_pyio.py Thu Jun 28 01:45:48 2012 +0200
+++ b/Lib/_pyio.py Thu Jun 28 12:21:26 2012 +0300
@@ -173,6 +173,8 @@
if "U" in modes:
if creating or writing or appending:
raise ValueError("can't use U and writing mode at once")
+ warnings.warn("Use of 'U' mode is deprecated",
+ DeprecationWarning)
reading = True
if text and binary:
raise ValueError("can't have text and binary mode at once")
« no previous file with comments | « no previous file | Lib/fileinput.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7