James Hartley schreef op 29/07/2019 om 22:36:
On occasion, I put long URL's into comments/docstrings simply to document where I found specific information. However, to be a good disciple of PEP8, anything which can't fit within 72 characters needs to be split across multiple lines. Since a number of you seem to be prolific Python coders, what opinion do you have about splitting URL's in comments/docstrings?
In my opinion this is one of the cases where this quote from PEP 8 applies:
"However, know when to be inconsistent -- sometimes style guide recommendations just aren't applicable. When in doubt, use your best judgment."
My preference would be not to split the URLs. The reader doesn't need to see the whole URL to understand the structure of the code; the full URL is really only needed to copy/paste it into a browser.
-- "Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger." -- Franklin P. Jones Roel Schroeven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor