GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Remove duplicate code by making `traceback.print_list()` delegate to `format_list()` · Issue #153782 · python/cpython Open Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior) DescriptionIn Problem
def format_list(extracted_list): return StackSummary.from_list(extracted_list).format()
def print_list(extracted_list, file=None): if file is None: file = sys.stderr for item in StackSummary.from_list(extracted_list).format(): print(item, file=file, end="") The outputs match only because SolutionHave def print_list(extracted_list, file=None): if file is None: file = sys.stderr for item in format_list(extracted_list): print(item, file=file, end="") This eliminates the possibility of drift and mirrors the delegation already used in this module; for example, Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior) Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |