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 — ElementTree: invalid paths raise KeyError instead of SyntaxError, and C and Python disagree on them · Issue #161808 · python/cpython Open Labels extension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-XMLtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug descriptionSome malformed paths make import xml.etree.ElementTree as ET root = ET.Element("root") root.find("@") # KeyError: '@' (C accelerator and pure Python) root.find("x=y") # pure Python: KeyError: '=' C accelerator: None root.find(")") # pure Python: KeyError: ')' C accelerator: None root.find("]") # pure Python: KeyError: ']' C accelerator: None (The pure-Python results can be reproduced by blocking the accelerator: Cause. Expected. Whether the C fast path should also send such paths to I'm happy to open a PR. CPython versions tested on:CPython main branch, 3.14, 3.13, 3.12 Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-XMLtype-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. |