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 — pure-Python suggestion fallback differs from the C implementation · Issue #161495 · python/cpython Open Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportThe pure-Python loop in
import sys, traceback, _suggestions class A: def __init__(self, names): self.names = names def __dir__(self): return self.names def pure_python(names, wrong): sys.modules['_suggestions'] = None try: getattr(A(names), wrong) except AttributeError as e: return traceback._compute_suggestion_error(e, e.__traceback__, wrong) finally: sys.modules['_suggestions'] = _suggestions for names, wrong in [ (['tuple', 'True'], 'ture'), (['x' * 41 + 'y'], 'x' * 41), ([f'name{i:03}' for i in range(749)] + ['vvvvv'], 'vvvvx'), ]: print(_suggestions._generate_suggestions(sorted(names), wrong), pure_python(names, wrong)) CPython versions tested on:CPython main branch Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue 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. |