changeset: 82959:9dba3bc7c2a6 user: Victor Stinner date: Tue Mar 26 01:14:35 2013 +0100 files: Lib/_pyio.py Lib/sre_compile.py Lib/test/test_decimal.py description: Issue #17516: remove dead code diff -r 33bdd0a985b9 -r 9dba3bc7c2a6 Lib/_pyio.py --- a/Lib/_pyio.py Tue Mar 26 01:14:08 2013 +0100 +++ b/Lib/_pyio.py Tue Mar 26 01:14:35 2013 +0100 @@ -2054,7 +2054,6 @@ 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 -r 33bdd0a985b9 -r 9dba3bc7c2a6 Lib/sre_compile.py --- a/Lib/sre_compile.py Tue Mar 26 01:14:08 2013 +0100 +++ b/Lib/sre_compile.py Tue Mar 26 01:14:35 2013 +0100 @@ -65,13 +65,6 @@ 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 -r 33bdd0a985b9 -r 9dba3bc7c2a6 Lib/test/test_decimal.py --- a/Lib/test/test_decimal.py Tue Mar 26 01:14:08 2013 +0100 +++ b/Lib/test/test_decimal.py Tue Mar 26 01:14:35 2013 +0100 @@ -290,7 +290,6 @@ 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', '')

AltStyle によって変換されたページ (->オリジナル) /