Skip to content

Use constants instead of hard-coded strings in Tools/cases_generator #122449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
picnixz opened this issue Jul 30, 2024 · 1 comment
Closed

Use constants instead of hard-coded strings in Tools/cases_generator #122449

picnixz opened this issue Jul 30, 2024 · 1 comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@picnixz
Copy link
Member

picnixz commented Jul 30, 2024

Feature or enhancement

Proposal:

I suggest improving the token kind checks tkn.kind == "<hardcoded string>" by using the corresponding lexer's constant string (which already exists). Some portion of the code already does it but not everywhere. We can also do the same for other kind of constructions where hard-coded strings could be replaced by constants, both for the semantics and for safety.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@picnixz picnixz added type-feature A feature request or enhancement interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jul 30, 2024
@picnixz
Copy link
Member Author

picnixz commented Apr 20, 2025

Closing due to lack of support (see #122448 (comment)).

@picnixz picnixz closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant