diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-03-26 00:14:35 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-03-26 00:14:35 (GMT) |
commit | 678ad51b3860c0d5cbf9188e50e72f0b04d1140e (patch) | |
tree | 04bf5bcaeb771b607fc180223a3bbd176a34f8f2 /Lib | |
parent | 3fa1aaebde6408dcfe169932d35bf922a77e64c9 (diff) | |
download | cpython-678ad51b3860c0d5cbf9188e50e72f0b04d1140e.zip cpython-678ad51b3860c0d5cbf9188e50e72f0b04d1140e.tar.gz cpython-678ad51b3860c0d5cbf9188e50e72f0b04d1140e.tar.bz2 |
Issue #17516: remove dead code
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/_pyio.py | 1 | ||||
-rw-r--r-- | Lib/sre_compile.py | 7 | ||||
-rw-r--r-- | Lib/test/test_decimal.py | 1 |
3 files changed, 0 insertions, 9 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py index c44f47c..137ebcb 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -2054,7 +2054,6 @@ class StringIO(TextIOWrapper): if not isinstance(initial_value, str): raise TypeError("initial_value must be str or None, not {0}" .format(type(initial_value).__name__)) - initial_value = str(initial_value) self.write(initial_value) self.seek(0) diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index 90e3a25..ea6e6be 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -65,13 +65,6 @@ def _compile(code, pattern, flags): elif op in REPEATING_CODES: if flags & SRE_FLAG_TEMPLATE: raise error("internal: unsupported template operator") - emit(OPCODES[REPEAT]) - skip = _len(code); emit(0) - emit(av[0]) - emit(av[1]) - _compile(code, av[2], flags) - emit(OPCODES[SUCCESS]) - code[skip] = _len(code) - skip elif _simple(av) and op is not REPEAT: if op is MAX_REPEAT: emit(OPCODES[REPEAT_ONE]) diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py index e8256a5..7fcd2a8 100644 --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -290,7 +290,6 @@ class IBMTestCases(unittest.TestCase): global skip_expected if skip_expected: raise unittest.SkipTest - return with open(file) as f: for line in f: line = line.replace('\r\n', '').replace('\n', '') |