Re: [Python-ideas] PEP 8 and long string literals

2019-02-26 Thread Vinicius Mesel
If you use Atom (http://atom.io), you can use the default functionality called Wrap Guide. The wrap guide is fully configurable to your needs on different line lengths (https://github.com/atom/wrap-guide). The example on the doc shows 4 wrap guides: 'wrap-guide': 'columns': [72, 80, 100, 120]

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread Stephen J. Turnbull
David Mertz writes: > However, what I care about more than that is my editor. It would be really > nice if my editor provided something like "vertical folding" for things > like this. I do not know of any editors that do that, but it would be easy > to imagine. E.g. I might have an editor di

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread David Mertz
I've sort of lost the threads about who recommends what. I do not think that PEP8 needs to include a sentence like "Better tooling would be really cool" ... notwithstanding that I think that is a true sentence. On Mon, Feb 25, 2019 at 2:50 PM Jonathan Fine wrote: > Hi David > > Thank you for sh

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread Gregory P. Smith
On Mon, Feb 25, 2019 at 2:05 AM INADA Naoki wrote: > I think long URL in comment or docstring is good reason to ignore > line length limit. > Yep, that's what we do in the yapf autoformatter. There's good reason too, source viewers and editors linkify URLs, if you break them across strings to f

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread Jonathan Fine
Hi David Thank you for sharing your experience. I'd be most grateful if you could tell us, are you happy with the interpretation and additions I've suggested for PEP 8? And the revisions to pep8 and other linting tools? Jonathan ___ Python-ideas maili

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread David Mertz
I find the main pain point of line width limits to be string literals that call out to some *other* code-like thing. Long URLs, user messages, and long SQL are three common examples. It's actually less an issue with SQL since that is itself more readable across multiple lines, plus SQL itself doe

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread David B
I generally break them up and then use "".join() as that is "most readable" IMHO. The same is true for SQL queries. On 2/25/19, Jonathan Fine wrote: > On Mon, Feb 25, 2019 at 10:05 AM INADA Naoki > wrote: >> I think long URL in comment or docstring is good reason to ignore >> line length limit

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread Jonathan Fine
On Mon, Feb 25, 2019 at 10:05 AM INADA Naoki wrote: > I think long URL in comment or docstring is good reason to ignore > line length limit. A very good point. We can't banish long URLs from the Internet, because they violate PEP 8. > But I'm not sure about general long string literals. I hope

Re: [Python-ideas] PEP 8 and long string literals

2019-02-25 Thread INADA Naoki
I think long URL in comment or docstring is good reason to ignore line length limit. But I'm not sure about general long string literals. -- INADA Naoki ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/pyt

[Python-ideas] PEP 8 and long string literals

2019-02-25 Thread Jonathan Fine
I've started this thread, because I think long string literals are somewhat special, and may have an easy resolution. According to PEP 8 a good reason to ignore the line-length (or any other) guideline is that "applying the guideline would make the code less readable, even for someone who is used