Skip to content
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

Parse int for lltrace #128394

Closed
WolframAlph opened this issue Jan 1, 2025 · 2 comments
Closed

Parse int for lltrace #128394

WolframAlph opened this issue Jan 1, 2025 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@WolframAlph
Copy link
Contributor

WolframAlph commented Jan 1, 2025

Feature or enhancement

Proposal:

Addressing TODOs when getting lltrace env var:

lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that

lltrace = *uop_debug - '0'; // TODO: Parse an int and all that

lltrace = *uop_debug - '0'; // TODO: Parse an int and all that

lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that

lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

@WolframAlph WolframAlph added the type-feature A feature request or enhancement label Jan 1, 2025
@picnixz picnixz added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 1, 2025
@serhiy-storchaka
Copy link
Member

I do not think this properly addresses the TODOs. How does it work if the value is not a number? If it starts with 0 or 0x?

Proper fix should check for errors and reject non-decimals. If the code is performance sensitive, it should use fast paths (if the value is dynamic) or caching. Since it is an experimental code added only 1.5 years ago (51fc725), we can wait more time before polishing it.

cc @gvanrossum

@gvanrossum
Copy link
Member

I'm sorry, this is not something that needs to be fixed. I am pretty much the only user and python needs to be compiled with an undocumented -D flag for this code to be compiled. The TODO lines were purely for myself. Sorry again.

@gvanrossum gvanrossum closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 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

4 participants