use-python-keyword
Python keyword and soft-keyword primitives for RustUse.
Experimental
use-python-keyword is experimental while use-python remains below 0.3.0.
Example
use ;
let keyword: PythonKeyword = "async".parse?;
assert_eq!;
assert!;
# Ok::
Scope
- Common hard Python keywords.
- Common soft keywords such as
match,case,type, and_. - Display and parse helpers that preserve Python source spelling.
Non-goals
- Parsing Python source code.
- Determining whether a soft keyword is active in a specific grammar context.
- Tracking future Python grammar changes at runtime.
License
Licensed under either Apache-2.0 or MIT.