|
|
Log in / Subscribe / Register

An overview of structural pattern matching for Python

An overview of structural pattern matching for Python

Posted May 4, 2022 18:33 UTC (Wed) by bartoc (guest, #124262)
In reply to: An overview of structural pattern matching for Python by epa
Parent article: An overview of structural pattern matching for Python

Algol 68, and Oberon-7 (among other versions) put keywords in a totally separate namespace and reserve the whole space. Everything ALLCAPS in oberon is a keyword, and you must not use such things as identifiers. Similarly algol 68 required surrounding keywords in back-ticks or something.

The middle ground is allowing some kind of stropping to turn what would be a keyword into an identifier, that way you can “update” in an automated fashion

if you have a module system the parser can just parse according to what the module expects.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds