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

Update section on debug specifier to include !r conversion #21

Closed
davepeck opened this issue Oct 22, 2024 · 1 comment
Closed

Update section on debug specifier to include !r conversion #21

davepeck opened this issue Oct 22, 2024 · 1 comment
Assignees

Comments

@davepeck
Copy link
Owner

davepeck commented Oct 22, 2024

As mentioned by Jan Kaliszewski in Discourse:

to be consistent with f-strings, it should be treated as t'expr={expr!r}'

That's a good catch!

@davepeck davepeck self-assigned this Oct 22, 2024
@davepeck davepeck converted this from a draft issue Oct 22, 2024
@zuo
Copy link

zuo commented Oct 27, 2024

To be even more precise:

  • t'{expr=}' should be treated as t'expr={expr!r}', but
  • t'{expr=:SOMETHING}' should be treated as t'expr={expr!s:SOMETHING}' (in particular: t'{expr=:}' should effectively be treated as t'expr={expr!s}', and
  • whitespace characters before expr as well as before and after = should be kept as-is [assuming it is technically possible].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants