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
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
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
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 ][+
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.
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
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
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
> 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
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://
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
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
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
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
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
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
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
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
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
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
>> >>>
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
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
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
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.
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
>
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
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")
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
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"),
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
=> 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
>
> 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
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.
>>>
>>>
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?
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?
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
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
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
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
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?
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
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
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
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
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
> 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
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
> 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
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
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
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
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
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
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
> >
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
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
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
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
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
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
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
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
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
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
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
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).
66 matches
Mail list logo