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

To Ruby from Python - f-strings/expression substitution #3073

Open
mheguy-stingray opened this issue Jun 14, 2023 · 0 comments
Open

To Ruby from Python - f-strings/expression substitution #3073

mheguy-stingray opened this issue Jun 14, 2023 · 0 comments

Comments

@mheguy-stingray
Copy link

Heya,

I'm brand new to Ruby so I hope I'm not mistaken with this issue.

I was looking at this page: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/

The fourth point in "differences" is:

... a special “expression substitution” syntax (which allows you to insert the results of Ruby expressions directly into other strings without having to "add " + "strings " + "together"). ...

I get the sense that the expression substitution is the same as f-strings in Python which were introduced in 3.6. f"Hello {name}"

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

No branches or pull requests

1 participant