Re: Python indentation (3 spaces)

2018-10-07 Thread Gene Heskett
On Sunday 07 October 2018 19:20:57 Dennis Lee Bieber wrote: > On Sun, 7 Oct 2018 14:19:15 -0400, Gene Heskett > > declaimed the following: > >But that automatically assumes one is running in a windows > > environment. I don't allow it on the premises if I own the machine. > > Are there good, alte

Re: Python indentation (3 spaces)

2018-10-07 Thread Gene Heskett
On Sunday 07 October 2018 18:47:45 Chris Angelico wrote: > On Mon, Oct 8, 2018 at 9:46 AM Gene Heskett wrote: > > On Sunday 07 October 2018 18:29:21 Chris Angelico wrote: > > > On Mon, Oct 8, 2018 at 9:26 AM Gene Heskett > > > > wrote: > > > > On Sunday 07 October 2018 17:36:34 Chris Angelico w

Re: Python indentation (3 spaces)

2018-10-07 Thread Cameron Simpson
On 08Oct2018 09:47, Chris Angelico wrote: On Mon, Oct 8, 2018 at 9:46 AM Gene Heskett wrote: On Sunday 07 October 2018 18:29:21 Chris Angelico wrote: > Ah. Fair enough, then. Basically, you want the Python equivalent of > "gcc -Wall -Wpedantic". > Is there such a critter? Not really; there's

Re: Python indentation (3 spaces)

2018-10-07 Thread Chris Angelico
On Mon, Oct 8, 2018 at 10:31 AM Terry Reedy wrote: > > On 10/7/2018 2:35 PM, Ryan Johnson wrote: > > > The logic is that all the text editors that are designed to work with > > Python code will KNOW to replace tab input with 3 characters, while still > > parsing the \t tab character as 4 charact

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/7/2018 2:35 PM, Ryan Johnson wrote: The logic is that all the text editors that are designed to work with Python code will KNOW to replace tab input with 3 characters, while still parsing the \t tab character as 4 characters; What do you mean by 'parsing a tab character as 4 characters

Re: Re: Python indentation (3 spaces)

2018-10-07 Thread Peter via Python-list
It's also useful to be aware of the standard tabnanny module for "Detection of ambiguous indentation". Very useful for highlighting problems with tabs and spaces. Peter On 8/10/2018 2:32 AM, Terry Reedy wrote: On 10/5/2018 11:30 PM, Ryan Johnson wrote: The point that OP is trying to make is

Re: Python indentation (3 spaces)

2018-10-07 Thread Chris Angelico
On Mon, Oct 8, 2018 at 9:46 AM Gene Heskett wrote: > > On Sunday 07 October 2018 18:29:21 Chris Angelico wrote: > > > On Mon, Oct 8, 2018 at 9:26 AM Gene Heskett > wrote: > > > On Sunday 07 October 2018 17:36:34 Chris Angelico wrote: > > > > On Mon, Oct 8, 2018 at 8:27 AM Gene Heskett > > > > >

Re: Python indentation (3 spaces)

2018-10-07 Thread Gene Heskett
On Sunday 07 October 2018 18:29:21 Chris Angelico wrote: > On Mon, Oct 8, 2018 at 9:26 AM Gene Heskett wrote: > > On Sunday 07 October 2018 17:36:34 Chris Angelico wrote: > > > On Mon, Oct 8, 2018 at 8:27 AM Gene Heskett > > > > wrote: > > [...]> > > > > > Okay, but I'm trying to understand why

Re: Python indentation (3 spaces)

2018-10-07 Thread Chris Angelico
On Mon, Oct 8, 2018 at 9:26 AM Gene Heskett wrote: > > On Sunday 07 October 2018 17:36:34 Chris Angelico wrote: > > > On Mon, Oct 8, 2018 at 8:27 AM Gene Heskett > wrote: > [...]> > > Okay, but I'm trying to understand why you're referencing this in this > > thread about indentation. That would i

Re: Python indentation (3 spaces)

2018-10-07 Thread Gene Heskett
On Sunday 07 October 2018 17:36:34 Chris Angelico wrote: > On Mon, Oct 8, 2018 at 8:27 AM Gene Heskett wrote: [...]> > Okay, but I'm trying to understand why you're referencing this in this > thread about indentation. That would imply that you at least have > reason to suspect that the problem i

Re: Python indentation (3 spaces)

2018-10-07 Thread Bev in TX
> On Oct 7, 2018, at 4:30 PM, Gene Heskett wrote: > >> Free for Linux, Macs and Windows ... >> https://code.visualstudio.com/Download >> >> > > >> >> Bev in TX > > Thank

Re: Python indentation (3 spaces)

2018-10-07 Thread Chris Angelico
On Mon, Oct 8, 2018 at 8:27 AM Gene Heskett wrote: > > On Sunday 07 October 2018 14:30:04 Chris Angelico wrote: > > > On Mon, Oct 8, 2018 at 5:20 AM Gene Heskett > wrote: > > > This poster is 200% correct. Somewhere, someplace, there should be > > > easily found rule that dictates where one can u

Re: Python indentation (3 spaces)

2018-10-07 Thread Gene Heskett
On Sunday 07 October 2018 14:30:07 Bev in TX wrote: > > On Oct 7, 2018, at 1:19 PM, Gene Heskett wrote: > >>> That > >>> said, there is an easy fix for tab misuse: in Visual Studio Code, > >>> you can replace all Tabs with Spaces by highlighting the entire > >>> code block, hitting Tab once and

Re: Python indentation (3 spaces)

2018-10-07 Thread Gene Heskett
On Sunday 07 October 2018 14:30:04 Chris Angelico wrote: > On Mon, Oct 8, 2018 at 5:20 AM Gene Heskett wrote: > > This poster is 200% correct. Somewhere, someplace, there should be > > easily found rule that dictates where one can use a tab, and where > > spaces only are allowed. > > Ask the peo

Re: Python indentation (3 spaces)

2018-10-07 Thread Chris Angelico
On Mon, Oct 8, 2018 at 5:39 AM Ryan Johnson wrote: > > > What library? From where? > > It was a GitHub repository for a zebra scanner (barcode scanner) module (and > sorry for calling it a library; I don’t recall if it was a library or module). > > The logic is that all the text editors that are

RE: Python indentation (3 spaces)

2018-10-07 Thread Ryan Johnson
> What library? From where? It was a GitHub repository for a zebra scanner (barcode scanner) module (and sorry for calling it a library; I don’t recall if it was a library or module). The logic is that all the text editors that are designed to work with Python code will KNOW to replace tab inpu

Re: Python indentation (3 spaces)

2018-10-07 Thread Chris Angelico
On Mon, Oct 8, 2018 at 5:20 AM Gene Heskett wrote: > This poster is 200% correct. Somewhere, someplace, there should be easily > found rule that dictates where one can use a tab, and where spaces only > are allowed. Ask the people who maintain makefiles whether that's a good thing or not. HINT: M

Re: Python indentation (3 spaces)

2018-10-07 Thread Bev in TX
> On Oct 7, 2018, at 1:19 PM, Gene Heskett wrote: > >>> >>> That >>> said, there is an easy fix for tab misuse: in Visual Studio Code, >>> you can replace all Tabs with Spaces by highlighting the entire code >>> block, hitting Tab once and Shift-Tab after. > > But that automatically assumes

Re: Python indentation (3 spaces)

2018-10-07 Thread Gene Heskett
On Sunday 07 October 2018 11:32:21 Terry Reedy wrote: > On 10/5/2018 11:30 PM, Ryan Johnson wrote: > > The point that OP is trying to make is that a fixed standard that is > > distinguishable from the even-spacing Tab-length convention in code > > and text editors will establish a level of trust b

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/5/2018 4:48 PM, ts9...@gmail.com wrote: I am new to Python programming but have significant SQL and C experience. My simple question is,"Why not standardize Python indentations to 3 spaces instead of 4 in order to avoid potential programming errors associated with using "TAB" instead

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/5/2018 11:30 PM, Ryan Johnson wrote: The point that OP is trying to make is that a fixed standard that is distinguishable from the even-spacing Tab-length convention in code and text editors will establish a level of trust between the end developer and upstream developers or co-developers w

Re: Python indentation (3 spaces)

2018-10-07 Thread Terry Reedy
On 10/6/2018 3:47 PM, C W Rose via Python-list wrote: Ryan Johnson wrote: The point that OP is trying to make is that a fixed standard that is distinguishable from the even-spacing Tab-length convention in code and text editors will establish a level of trust between the end developer and upstr

Re: Python indentation (3 spaces)

2018-10-07 Thread C W Rose via Python-list
Ryan Johnson wrote: > The point that OP is trying to make is that a fixed standard that is > distinguishable from the even-spacing Tab-length convention in code and > text editors will establish a level of trust between the end developer and > upstream developers or co-developers who may not have