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 — Two CPython 3.11 syntax changes involving * operator are unsupported · Issue #4479 · RustPython/RustPython Closed Labels A-vmArea: virtual machineArea: virtual machine DescriptionFeatureIn Python 3.11, the try: print("yay") except* Exception as e: print("oh no") I discovered this while digging into some code that ruff cannot handle, which on the surface looks like a slightly different issue. The following snippet is valid CPython 3.11 but also throws a my_dict = {} my_dict[*"ab"] = 1 The expected behaviour is that the string should be unpacked and the value of the dict with key import typing values = ["dog", "cat"] Pets = typing.Literal[*values] Python DocumentationThe first incompatibility issue is clearly documented here, and called out under New syntax features in What’s New In Python 3.11. However the second incompatibility is not documented in the changelog, and I did confirm that this was new in CPython 3.11, as the snippet throws a syntax error in 3.10. I wonder if this was a (nice?) side-effect of the changes that were introduced to make Reacted by DimitrisJim Reacted by Copilot Activity
MetadataMetadataAssigneesLabelsA-vmArea: virtual machineArea: virtual machine TypeProjectsMilestoneRelationshipsDevelopmentIssue 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. |