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 — `f'"{var:}"'` adds redundant empty string literal in AST in 3.12 · Issue #106396 · python/cpython Closed Labels 3.12only security fixesonly security fixes3.13only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Description3.11: >>> import ast >>> print(ast.dump(ast.parse("""f'"{var:}"'"""), indent=2)) Module( body=[ Expr( value=JoinedStr( values=[ Constant(value='"'), FormattedValue( value=Name(id='var', ctx=Load()), conversion=-1, format_spec=JoinedStr(values=[])), Constant(value='"')]))], type_ignores=[]) 3.12: >>> import ast >>> print(ast.dump(ast.parse("""f'"{var:}"'"""), indent=2)) Module( body=[ Expr( value=JoinedStr( values=[ Constant(value='"'), FormattedValue( value=Name(id='var', ctx=Load()), conversion=-1, format_spec=JoinedStr( values=[ Constant(value='')])), Constant(value='"')]))], type_ignores=[]) This affects several linters:
Is this a bug? Or is it a feature? Linked PRsReacted by sunmy2019 Activity
MetadataMetadataAssigneesLabels3.12only security fixesonly security fixes3.13only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-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. |