Re: [Python-ideas] PEP 8 update on line length

2019-02-25 Thread Stephen J. Turnbull
Alex Walters writes: > There is no way to win in changing the guideline. IMO this is true, despite the comment below: > PEP-8 is not a universal truth, or even a standard, we really > shouldn't be treating it like it is. Unfortunately, it's not us (at least, I don't think it is), and it's no

[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

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 [email protected] https://mail.python.org/mailman/listinfo/pyt

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] Support localization of unicode descriptions

2019-02-25 Thread Thomas Jollans
On 10/07/2018 23.20, David Mertz wrote: > The problem with non-canonical translations of the Unicode character > names is that there is not one unique possible rendering into language > X. Equally, I could find synonyms in general English for the names, but > one would be official, the others at be

Re: [Python-ideas] PEP 8 update on line length

2019-02-25 Thread Abdur-Rahmaan Janhangeer
saw that today 80 Characters per Line Is a Standard Worth Sticking to Even Today https://dev.to/nickjj/80-characters-per-line-is-a-standard-worth-sticking-to-even-today-26kk Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius On Tue, 19 Feb 2019,

Re: [Python-ideas] Type hints for functions with side-effects and for functions raising exceptions

2019-02-25 Thread Kyle Lahnakoski
On 2019-02-22 17:20, Chris Angelico wrote: > On Sat, Feb 23, 2019 at 9:14 AM Kyle Lahnakoski > wrote: >> Can Python provide better support for the CNCR pattern? If it is >> lightweight enough, maybe people will use it, and then we can say >> something useful about the (restricted) range of excep

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 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 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 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 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 update on line length

2019-02-25 Thread Christopher Barker
> saw that today > > 80 Characters per Line Is a Standard Worth Sticking to Even Today > https://dev.to/nickjj/80-characters-per-line-is-a-standard-worth-sticking-to-even-today-26kk > Same arguments made in this thread. I noticed that most of the comments were from folks disagreeing:-) Anyway, th

Re: [Python-ideas] PEP 8 update on line length

2019-02-25 Thread Abdur-Rahmaan Janhangeer
i thought it interesting as it presented a non py's view of things (web dev) for the 80 chars length. Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius ___ Python-ideas mailing list [email protected]

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