You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a look at the standard for docstrings, which are a common Python example of multi-line strings (https://peps.python.org/pep-0257/) but that simply says putting a newline right after the opening quotes is optional. I used the format I tend to use myself with but I guess I'm not really fussed either way.
Regarding when to use robust quoting, my current approach in my real workflows is to use robust quoting consistently for everything, rather then looking at each case and adding the r only when necessary. So I taught it the way I do it. But then you might fairly point out that I'm not using r"..." for regular quotes, so this is inconsistent.
Given that none of the examples in the main workflow rely on the r, perhaps this should be relegated to chapter 13 after all. It does make the code more readable.
From @jdblischak
I know you recommend using
r"""
to make the quoting more robust, but personally I find this more readable:compared to your recommendation:
Especially since this example doesn't require robust quoting.
The text was updated successfully, but these errors were encountered: