Re: PEP8 79 char max

2013-09-07 Thread Serhiy Storchaka
06.09.13 06:40, Steven D'Aprano написав(ла): PEP 8 certainly is a collection of rules. They are mandatory for new code added to the standard library, and optional but recommended for third party libraries. No. They are optional but recommended for new code added to the standard library, and in

Re: PEP8 79 char max

2013-09-06 Thread Metallicow
Google(will) Search This Message: Industry Standards, PEP8, Whitespace, Print, Printing, Opinion' I could add more... For example: Pantone color wheel. -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-09-06 Thread Metallicow
On Thursday, September 5, 2013 11:01:31 PM UTC-5, Steven D'Aprano wrote: > On Thu, 05 Sep 2013 19:59:34 -0700, Metallicow wrote: > > PEP8 needs a bit of revision anyway, In my opinion... According to > > real-world standards for equipment/devices. linking to a table/list of > > affected devices/min

Re: PEP8 79 char max

2013-09-06 Thread Neil Cerutti
On 2013-09-06, Tim Chase wrote: > On 2013-09-06 20:47, Tim Delaney wrote: >> On 6 September 2013 20:35, Tim Chase wrote: >> > I'm just glad it's no longer 40-chars-per-column and purely >> > upper-case like the Apple ][+ on which I cut my programming >> > teeth. >> >> Couldn't you switch the ][+

Re: PEP8 79 char max

2013-09-06 Thread Tim Chase
On 2013-09-06 20:47, Tim Delaney wrote: > On 6 September 2013 20:35, Tim Chase wrote: > > I'm just glad it's no longer 40-chars-per-column and purely > > upper-case like the Apple ][+ on which I cut my programming teeth. > > Couldn't you switch the ][+ into high-res mode? You could with the > IIe.

Re: PEP8 79 char max

2013-09-06 Thread Metallicow
RailRoadTieWidth = 79.1234567890 >>> 79 = 'Width Of A Horse"s Ass' File "", line 1 SyntaxError: can't assign to literal >>>RailRoadTieWidth.attribute ("American", "Steam") >>>79.attribute = ("Roman", "Chariot") File "", line 1 79.attribute = ("Roman", "Chariot") ^ SyntaxE

Re: PEP8 79 char max

2013-09-06 Thread Tim Delaney
On 6 September 2013 20:35, Tim Chase wrote: > On 2013-09-06 05:09, Skip Montanaro wrote: > > And thank goodness for SIGWINCH. :-) > > BEDEVERE: How do you know she is a SIGWINCH? > > VILLAGER: She looks like one. > > CROWD: Right! Yeah! Yeah! > > > :-) > > I'm just glad it's no longer 40-chars-pe

Re: PEP8 79 char max

2013-09-06 Thread Tim Chase
On 2013-09-06 05:09, Skip Montanaro wrote: > And thank goodness for SIGWINCH. :-) BEDEVERE: How do you know she is a SIGWINCH? VILLAGER: She looks like one. CROWD: Right! Yeah! Yeah! :-) I'm just glad it's no longer 40-chars-per-column and purely upper-case like the Apple ][+ on which I cut m

Re: PEP8 79 char max

2013-09-06 Thread Skip Montanaro
> Well, what I interpret as the PEP8 79 is chars visible minus the '\n' or > '\r\n'(which would be 2; 81) line enders. You young un's. Always makin' stuff up... :-) In these days of fancy single-user PCs with sophisticated window systems, people tend to forget that BITD there was a thriving mark

Re: PEP8 79 char max

2013-09-05 Thread Metallicow
On Thursday, September 5, 2013 11:01:31 PM UTC-5, Steven D'Aprano wrote: > And that's especially badly thought out. How is an import that occurs > when the code is *run* supposed to make a difference to the way the code > is *written*? Proofreading. Or maybe call it pre typesetting. -- https://

Re: PEP8 79 char max

2013-09-05 Thread Metallicow
On Thursday, September 5, 2013 10:40:46 PM UTC-5, Steven D'Aprano wrote: > Thanks for the comments, and welcome, but I really don't have a clue what > the relevance of most of them are. Real-world Experience. > > If you are still using equipment that requires 79, then chances are you > > have/will

Re: PEP8 79 char max

2013-09-05 Thread Steven D'Aprano
On Thu, 05 Sep 2013 19:59:34 -0700, Metallicow wrote: > PEP8 needs a bit of revision anyway, In my opinion... According to > real-world standards for equipment/devices. linking to a table/list of > affected devices/minNumbers should be the norm. or I don't believe you have thought this throug

Re: PEP8 79 char max

2013-09-05 Thread Steven D'Aprano
On Thu, 05 Sep 2013 15:21:28 -0700, Metallicow wrote: > Well as for my opinion, it is more closer to the truth than others > because... Experience: > 1. I know Python and have read the PEP8. 2. I have knowledge of/worked > with the Printing Trades. 3. Grandfather owned/operated own Printshop > for

Re: PEP8 79 char max

2013-09-05 Thread Metallicow
On Thursday, September 5, 2013 8:47:01 PM UTC-5, Terry Reedy wrote: > On 9/5/2013 6:21 PM, Metallicow wrote: > > > > > > If you are still using equipment that requires 79, then chances are you > > have/will already gone out of business or are keeping/using said equipment > > for nostalgic purpo

Re: PEP8 79 char max

2013-09-05 Thread Terry Reedy
On 9/5/2013 6:21 PM, Metallicow wrote: If you are still using equipment that requires 79, then chances are you have/will already gone out of business or are keeping/using said equipment for nostalgic purposes. As far as math goes. 10 is a nice round number. 79 chars + 1 cursor (or \n) == 80

Re: PEP8 79 char max

2013-09-05 Thread Metallicow
Well as for my opinion, it is more closer to the truth than others because... Experience: 1. I know Python and have read the PEP8. 2. I have knowledge of/worked with the Printing Trades. 3. Grandfather owned/operated own Printshop for 40+yrs. Which I also worked in at one point. If you are still

Re: PEP8 79 char max

2013-08-03 Thread Wayne Werner
On Wed, 31 Jul 2013, Joshua Landau wrote: To explain, I tend to take the "HTML" form of alignment by wrapping: open stuff stuff stuff close to open     stuff     stuff     stuff close Depending on how much 'stuff' I have, I, for one, prefer a third: open stuff stuff stuff clo

Re: PEP8 79 char max

2013-08-02 Thread Grant Edwards
On 2013-08-02, Dennis Lee Bieber wrote: > On Thu, 1 Aug 2013 19:29:06 + (UTC), Grant Edwards > declaimed the following: > >> >>I got tired of hand assembling (and disassembling) code for a custom >>microprocessor, so I wrote an assembler and a disassembler. > > Let me know when you recre

Re: PEP8 79 char max

2013-08-01 Thread Grant Edwards
On 2013-08-01, Grant Edwards wrote: > On 2013-08-01, Joshua Landau wrote: >> On 31 July 2013 17:32, Grant Edwards wrote: >> >>> On 2013-07-31, Tim Chase wrote: >>> > On 2013-07-31 07:16, Joshua Landau wrote: >>> >> On 30 July 2013 18:52, Grant Edwards wrote: >>> >>> I also find intializers for

Re: PEP8 79 char max

2013-08-01 Thread Grant Edwards
On 2013-08-01, Joshua Landau wrote: > On 31 July 2013 17:32, Grant Edwards wrote: > >> On 2013-07-31, Tim Chase wrote: >> > On 2013-07-31 07:16, Joshua Landau wrote: >> >> On 30 July 2013 18:52, Grant Edwards wrote: >> >>> I also find intializers for tables of data to be much more easily >> >>>

Re: PEP8 79 char max

2013-08-01 Thread Steven D'Aprano
On Thu, 01 Aug 2013 18:21:32 +0100, Joshua Landau wrote: > On 31 July 2013 17:32, Grant Edwards wrote: > >> On 2013-07-31, Tim Chase wrote: >> > On 2013-07-31 07:16, Joshua Landau wrote: >> >> On 30 July 2013 18:52, Grant Edwards wrote: >> >>> I also find intializers for tables of data to be mu

Re: PEP8 79 char max

2013-08-01 Thread Joshua Landau
On 31 July 2013 17:32, Grant Edwards wrote: > On 2013-07-31, Tim Chase wrote: > > On 2013-07-31 07:16, Joshua Landau wrote: > >> On 30 July 2013 18:52, Grant Edwards wrote: > >>> I also find intializers for tables of data to be much more easily > >>> read and maintained if the columns can be ali

Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
On 2013-07-31, Grant Edwards wrote: > On 2013-07-31, Neil Cerutti wrote: >> On 2013-07-31, Grant Edwards wrote: >>> On 2013-07-31, Neil Cerutti wrote: Besides, after studying The Pragmatic Programmer I removed nearly all the tables from my code and reference them (usually with cs

Re: PEP8 79 char max

2013-07-31 Thread Grant Edwards
On 2013-07-31, Neil Cerutti wrote: > On 2013-07-31, Grant Edwards wrote: >> On 2013-07-31, Neil Cerutti wrote: >>> Besides, after studying The Pragmatic Programmer I removed >>> nearly all the tables from my code and reference them (usually >>> with csv module) instead. >> >> I don't understand.

Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
On 2013-07-31, Grant Edwards wrote: > On 2013-07-31, Neil Cerutti wrote: >> Besides, after studying The Pragmatic Programmer I removed >> nearly all the tables from my code and reference them (usually >> with csv module) instead. > > I don't understand. That just moves them to a different file >

RE: PEP8 79 char max

2013-07-31 Thread Prasad, Ramit
Grant Edwards wrote: > On 2013-07-31, Neil Cerutti wrote: > > > Besides, after studying The Pragmatic Programmer I removed nearly > > all the tables from my code and reference them (usually with csv > > module) instead. > > I don't understand. That just moves them to a different file -- > doesn

Re: PEP8 79 char max

2013-07-31 Thread Tim Chase
On 2013-07-31 16:32, Grant Edwards wrote: > On 2013-07-31, Tim Chase wrote: > > I interpret Grant's statement as wanting the "table" to look like > > > > for name, value, description in ( > > ("cost", 42, "How much it cost"), > > ("status", 3141, "Status code from ISO-3.14159")

Re: PEP8 79 char max

2013-07-31 Thread Grant Edwards
On 2013-07-31, Neil Cerutti wrote: > Besides, after studying The Pragmatic Programmer I removed nearly > all the tables from my code and reference them (usually with csv > module) instead. I don't understand. That just moves them to a different file -- doesn't it? You've still got to deal with

Re: PEP8 79 char max

2013-07-31 Thread Tim Chase
On 2013-07-31 16:32, Grant Edwards wrote: > On 2013-07-31, Tim Chase wrote: > > I interpret Grant's statement as wanting the "table" to look like > > > > for name, value, description in ( > > ("cost", 42, "How much it cost"), > > ("status", 3141, "Status code from ISO-3.14159"),

Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
On 2013-07-31, Marcelo MD wrote: >> In my experience, aligning columns in large tables reduces >> maintence cost by making it much easier/faster to see what >> you've got and by providing a way to visually "prompt" you for >> the correct value in the correct place when you add new lines. > > Works

Re: PEP8 79 char max

2013-07-31 Thread Skip Montanaro
=> Works great until one of the values changes in size. Slightly off-topic, but still sort of related (talking about the size of things), I started picking 1e+30 as my "really big" some time back because the repr of 1e+99 required more than a glance when it appeared in printed output: >>> repr(1e

Re: PEP8 79 char max

2013-07-31 Thread Marcelo MD
> > In my experience, aligning columns in large tables reduces maintence > cost by making it much easier/faster to see what you've got and by > providing a way to visually "prompt" you for the correct value in the > correct place when you add new lines. > > Works great until one of the values chang

Re: PEP8 79 char max

2013-07-31 Thread Grant Edwards
On 2013-07-31, Neil Cerutti wrote: > On 2013-07-31, Tim Chase wrote: >> On 2013-07-31 07:16, Joshua Landau wrote: >>> On 30 July 2013 18:52, Grant Edwards wrote: I also find intializers for tables of data to be much more easily read and maintained if the columns can be aligned. >>> >>>

Re: PEP8 79 char max

2013-07-31 Thread Grant Edwards
On 2013-07-31, Tim Chase wrote: > On 2013-07-31 07:16, Joshua Landau wrote: >> On 30 July 2013 18:52, Grant Edwards wrote: >>> I also find intializers for tables of data to be much more easily >>> read and maintained if the columns can be aligned. >> >> Why do you have tables in your Python code?

Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
On 2013-07-31, Tim Chase wrote: > On 2013-07-31 07:16, Joshua Landau wrote: >> On 30 July 2013 18:52, Grant Edwards wrote: >>> I also find intializers for tables of data to be much more easily >>> read and maintained if the columns can be aligned. >> >> Why do you have tables in your Python code?

Re: PEP8 79 char max

2013-07-31 Thread Tim Chase
On 2013-07-31 07:16, Joshua Landau wrote: > On 30 July 2013 18:52, Grant Edwards wrote: >> I also find intializers for tables of data to be much more easily >> read and maintained if the columns can be aligned. > > Why do you have tables in your Python code? I've had occasion to write things like

Re: PEP8 79 char max

2013-07-31 Thread llanitedave
It's not just the number of characters, it's the size and the font. Even fixed-width fonts differ greatly in their readability. I can handle different line widths just fine up til about 120 or so without losing the flow of the program, but some fonts simply make it more difficult at any widt

Re: PEP8 79 char max

2013-07-30 Thread Joshua Landau
On 30 July 2013 18:52, Grant Edwards wrote: > On 2013-07-30, Joshua Landau wrote: > > On 30 July 2013 18:08, Vito De Tullio wrote: > > > >> Ed Leafe wrote: > >> > >> > I had read about a developer who switched to using proportional fonts > for > >> > coding, and somewhat skeptically, tried it o

Re: PEP8 79 char max

2013-07-30 Thread Cameron Simpson
On 29Jul2013 16:24, Devyn Collier Johnson wrote: | So, I can have a script with large lines and not negatively | influence performance on systems that do not use punch cards? Well, running anything will negatively impact the performance of a system for others...o Please think about what CPython

Re: PEP8 79 char max

2013-07-30 Thread Cameron Simpson
On 30Jul2013 01:41, Rhodri James wrote: | On Tue, 30 Jul 2013 01:11:18 +0100, Joshua Landau wrote: | >On 30 July 2013 00:08, Rhodri James wrote: | >>I'm working on some shonky C code at the moment that inconsistent | >>indentation and very long lines. [...] Have you tried the indent(1) command?

Re: PEP8 79 char max

2013-07-30 Thread Vito De Tullio
Joshua Landau wrote: >> By my (limited) experience with proportional fonts, they can be useful >> only with something like elastic tabstops[0]. But, as a general rule, I >> simply found more "squared" to just use a fixed-width font. > Not if you give up on the whole "aligning" thing. and this i

Re: PEP8 79 char max

2013-07-30 Thread Grant Edwards
On 2013-07-30, Joshua Landau wrote: > On 30 July 2013 18:08, Vito De Tullio wrote: > >> Ed Leafe wrote: >> >> > I had read about a developer who switched to using proportional fonts for >> > coding, and somewhat skeptically, tried it out. After a day or so it >> > stopped looking strange, and aft

Re: PEP8 79 char max

2013-07-30 Thread Joshua Landau
On 30 July 2013 18:08, Vito De Tullio wrote: > Ed Leafe wrote: > > > I had read about a developer who switched to using proportional fonts for > > coding, and somewhat skeptically, tried it out. After a day or so it > > stopped looking strange, and after a week it seemed so much easier to > > rea

Re: PEP8 79 char max

2013-07-30 Thread Vito De Tullio
Ed Leafe wrote: > I had read about a developer who switched to using proportional fonts for > coding, and somewhat skeptically, tried it out. After a day or so it > stopped looking strange, and after a week it seemed so much easier to > read. By my (limited) experience with proportional fonts, th

Re: PEP8 79 char max

2013-07-30 Thread Joshua Landau
On 30 July 2013 16:44, Skip Montanaro wrote: > > So if everyone basically follows PEP8 we all benefit from playing by > > the same game rules, as it were. > > (I think I'm agreeing with you, but nonetheless, I will forge ahead.) > > To the extent that 80-column window widths have been common for

Re: PEP8 79 char max

2013-07-30 Thread Skip Montanaro
> So if everyone basically follows PEP8 we all benefit from playing by > the same game rules, as it were. (I think I'm agreeing with you, but nonetheless, I will forge ahead.) To the extent that 80-column window widths have been common for so long, PEP 8 or not (and Python or not), there is a ton

Re: PEP8 79 char max

2013-07-30 Thread Neil Cerutti
On 2013-07-30, Skip Montanaro wrote: >> In that gauge I would exclude indentation (you don't count the >> number of characters the margin takes) > > I don't think anyone reads the margins. :-) > > That said, I agree that code and prose are fundamentally > different beasts. Still, when readin

Re: PEP8 79 char max

2013-07-30 Thread Skip Montanaro
> In that gauge I would exclude indentation (you don't count the > number of characters the margin takes) I don't think anyone reads the margins. :-) That said, I agree that code and prose are fundamentally different beasts. Still, when reading either and you get to the end of the line, you

Re: PEP8 79 char max

2013-07-29 Thread Joshua Landau
On 30 July 2013 01:41, Rhodri James wrote: > On Tue, 30 Jul 2013 01:11:18 +0100, Joshua Landau > wrote: > > On 30 July 2013 00:08, Rhodri James wrote: >> >>> I'm working on some shonky C code at the moment that inconsistent >>> indentation and very long lines. It is extremely annoying not to

Re: PEP8 79 char max

2013-07-29 Thread Rhodri James
On Tue, 30 Jul 2013 01:11:18 +0100, Joshua Landau wrote: On 30 July 2013 00:08, Rhodri James wrote: I'm working on some shonky C code at the moment that inconsistent indentation and very long lines. It is extremely annoying not to be able to put the original code, my "translation" and sund

Re: PEP8 79 char max

2013-07-29 Thread Joshua Landau
On 30 July 2013 00:08, Rhodri James wrote: > On Mon, 29 Jul 2013 22:09:10 +0100, Steven D'Aprano < > steve+comp.lang.python@**pearwood.info> > wrote: > > On Mon, 29 Jul 2013 15:43:49 -0400, Devyn Collier Johnson wrote: >> >> In Python programming, the PEP8 recommends limiting lines to a maximum

Re: PEP8 79 char max

2013-07-29 Thread Rhodri James
On Mon, 29 Jul 2013 22:09:10 +0100, Steven D'Aprano wrote: On Mon, 29 Jul 2013 15:43:49 -0400, Devyn Collier Johnson wrote: In Python programming, the PEP8 recommends limiting lines to a maximum of 79 characters because "There are still many devices around that are limited to 80 character l

Re: PEP8 79 char max

2013-07-29 Thread Ed Leafe
On Jul 29, 2013, at 5:30 PM, Devyn Collier Johnson wrote: > Evidently, it is personal preference. I prefer to read computer code like a > book (yes, I am a weirdo (^u^)). The only time I exced 79 characters is when > I write a set of commands that perform similar tasks. I do not make too many

Re: PEP8 79 char max

2013-07-29 Thread Joshua Landau
On 29 July 2013 22:34, Steven D'Aprano wrote: > On Mon, 29 Jul 2013 15:18:59 -0500, Ed Leafe wrote: > > > On Jul 29, 2013, at 3:08 PM, Joel Goldstick > > wrote: > >> Not performance, but human readability > > > > IMO, this isn't always the case. There are many lines of code > that are > >

Re: PEP8 79 char max

2013-07-29 Thread Devyn Collier Johnson
On 07/29/2013 05:42 PM, Steven D'Aprano wrote: On Mon, 29 Jul 2013 16:24:51 -0400, Devyn Collier Johnson wrote: So, I can have a script with large lines and not negatively influence performance on systems that do not use punch cards? You'll negatively influence anyone who has to read, or edit

Re: PEP8 79 char max

2013-07-29 Thread Joshua Landau
On 29 July 2013 22:18, Skip Montanaro wrote: > For the purposes of limiting the length you need to scan between first > and last column, I would recommend leaving the recommended line length > to ~ 80 columns. > > Just for grins, I grabbed a non-computer book, Atul Gawande's > "Checklist Manifest

Re: PEP8 79 char max

2013-07-29 Thread Terry Reedy
On 7/29/2013 5:01 PM, Terry Reedy wrote: On 7/29/2013 3:43 PM, Devyn Collier Johnson wrote: In Python programming, the PEP8 recommends limiting lines to a maximum of 79 characters because "There are still many devices around that are limited to 80 character lines" "plus, limiting windows to 80

Re: PEP8 79 char max

2013-07-29 Thread Steven D'Aprano
On Mon, 29 Jul 2013 16:24:51 -0400, Devyn Collier Johnson wrote: > So, I can have a script with large lines and not negatively influence > performance on systems that do not use punch cards? You'll negatively influence anyone who has to read, or edit, your code. Very likely including you. But n

Re: PEP8 79 char max

2013-07-29 Thread Steven D'Aprano
On Mon, 29 Jul 2013 15:18:59 -0500, Ed Leafe wrote: > On Jul 29, 2013, at 3:08 PM, Joel Goldstick > wrote: >> Not performance, but human readability > > IMO, this isn't always the case. There are many lines of code that are > broken up to meet the 79 character limit, and as a result

Re: PEP8 79 char max

2013-07-29 Thread Skip Montanaro
For the purposes of limiting the length you need to scan between first and last column, I would recommend leaving the recommended line length to ~ 80 columns. Just for grins, I grabbed a non-computer book, Atul Gawande's "Checklist Manifesto," from the pile on my desk and counted the number of cha

Re: PEP8 79 char max

2013-07-29 Thread Steven D'Aprano
On Mon, 29 Jul 2013 15:43:49 -0400, Devyn Collier Johnson wrote: > In Python programming, the PEP8 recommends limiting lines to a maximum > of 79 characters because "There are still many devices around that are > limited to 80 character lines" > (http://www.python.org/dev/peps/pep-0008/#code-lay-o

Re: PEP8 79 char max

2013-07-29 Thread Terry Reedy
On 7/29/2013 3:43 PM, Devyn Collier Johnson wrote: In Python programming, the PEP8 recommends limiting lines to a maximum of 79 characters because "There are still many devices around that are limited to 80 character lines" "plus, limiting windows to 80 characters makes it possible to have sev

Re: PEP8 79 char max

2013-07-29 Thread John Gordon
In Devyn Collier Johnson writes: > (http://www.python.org/dev/peps/pep-0008/#code-lay-out). What devices > cannot handle 80 or more characters on a line? For a start, older fixed-width dumb terminals and printers. And even some very new devices (tablet, smartphone) might have limited screen

Re: PEP8 79 char max

2013-07-29 Thread Ed Leafe
On Jul 29, 2013, at 3:08 PM, Joel Goldstick wrote: >> Would following >> this recommendation improve script performance? > > Not performance, but human readability IMO, this isn't always the case. There are many lines of code that are broken up to meet the 79 character limit, and as a

Re: PEP8 79 char max

2013-07-29 Thread Devyn Collier Johnson
On 07/29/2013 04:08 PM, Joel Goldstick wrote: On Mon, Jul 29, 2013 at 3:43 PM, Devyn Collier Johnson wrote: In Python programming, the PEP8 recommends limiting lines to a maximum of 79 characters because "There are still many devices around that are limited to 80 character lines" (http://www.p

Re: PEP8 79 char max

2013-07-29 Thread Joel Goldstick
On Mon, Jul 29, 2013 at 3:43 PM, Devyn Collier Johnson wrote: > In Python programming, the PEP8 recommends limiting lines to a maximum of 79 > characters because "There are still many devices around that are limited to > 80 character lines" (http://www.python.org/dev/peps/pep-0008/#code-lay-out).