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 — Lib/inspect.py: Avoid wild replacement in formatannotation · Issue #96073 · python/cpython Closed Labels type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportSource: Lines 1449 to 1458 in 91afe66
An error replacement happens in: repr(annotation).replace('typing.', '') Suppose that I define a class or Protocol under class A: pass Then Any module with suffix like SolutionReplace the line to: def repl(match): text = match.group() if text.startswith('typing.'): return text[len('typing.'):] return text return re.sub(r'[\w\.]+', repl, repr(annotation)) Activity
MetadataMetadataAssigneesLabelstype-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. |