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

Add raw strings #1873

Open
fuzzypixelz opened this issue Mar 27, 2024 · 3 comments
Open

Add raw strings #1873

fuzzypixelz opened this issue Mar 27, 2024 · 3 comments

Comments

@fuzzypixelz
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

See #1864.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Add r%"..."% syntax for raw strings, where no escape sequences are recognized.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

N/A.

Additional context
Add any other context or screenshots about the feature request here.

N/A.

@vi
Copy link
Contributor

vi commented Sep 12, 2024

Maybe usual m%%%%%%%" ... "%%%%%%% (with enough per cent characters) can fill that niche (at least partially)?

@vi
Copy link
Contributor

vi commented Sep 12, 2024

no escape sequences are recognized

But indentation works the same was as in usual multiline string or is also disabled (all bytes just copied literally)?

@yannham
Copy link
Member

yannham commented Sep 13, 2024

This is a good question. I would tend to disable indentation as well - so that raw is really raw, and there's no interpretation nor transformation whatsoever. But we could also imagine auto de-indenting them. I guess it depends on the use-case we see for raw strings.

You're right that in practice, multiline strings with long delimiters might be enough for most purposes.

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

No branches or pull requests

3 participants