-
In Python, multiple adjacent string or bytes literals (delimited by whitespace), possibly using different quoting conventions, are allowed, and their meaning is the same as their concatenation (source). I was wondering if an equivalent construct exists in Hy, or more generally, what would be the recommended way of splitting f-strings that are too long to fit on a single line. Merci 😉 |
Beta Was this translation helpful? Give feedback.
Answered by
scauligi
Jul 29, 2023
Replies: 1 comment 1 reply
-
Since Hy has prefix operators, it's easiest to just explicitly concatenate your different strings. Indeed, the => (hyrule.pprint "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
(+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod "
"tempor incididunt ut labore et dolore magna aliqua.") |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mcejp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since Hy has prefix operators, it's easiest to just explicitly concatenate your different strings. Indeed, the
pprint
function from Hyrule does exactly that: