]> granicus.if.org Git - python/commitdiff
Issue #17516: remove dead code
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 26 Mar 2013 00:14:35 +0000 (01:14 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 26 Mar 2013 00:14:35 +0000 (01:14 +0100)
Lib/_pyio.py
Lib/sre_compile.py
Lib/test/test_decimal.py

index c44f47c717e8faba7898e7d23a90e37ea61d99f8..137ebcbd82c31fdcb304388314ea3c99324caab2 100644 (file)
@@ -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)
 
index 90e3a25f1abef55ad3c2908a433fedb01a54bc6d..ea6e6be96e0dfd3b7a94279bb65cd4167dab3c60 100644 (file)
@@ -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])
index e8256a5c7f031f87b2d5b31560bb3817f258a44b..7fcd2a82cb3fc4648ba36c13d2182aed1cfb0bc8 100644 (file)
@@ -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', '')