Re: Python indentation (3 spaces)

2018-11-11 Thread Peter J. Holzer
On 2018-10-25 12:59:18 +0200, Antoon Pardon wrote: > On 20-10-18 14:38, Peter J. Holzer wrote: > > On 2018-10-16 06:37:56 +1100, Chris Angelico wrote: > >> On Tue, Oct 16, 2018 at 6:34 AM Peter J. Holzer wrote: > >>> On 2018-10-15 14:12:54 +0200, Antoon Pardon wrote: > On 13-10-18 09:37,

Re: Python indentation (3 spaces)

2018-10-25 Thread Antoon Pardon
On 20-10-18 14:38, Peter J. Holzer wrote: > On 2018-10-16 06:37:56 +1100, Chris Angelico wrote: >> On Tue, Oct 16, 2018 at 6:34 AM Peter J. Holzer wrote: >>> On 2018-10-15 14:12:54 +0200, Antoon Pardon wrote: On 13-10-18 09:37, Peter J. Holzer wrote: > On 2018-10-09 09:55:34 +0200,

Re: Python indentation (3 spaces)

2018-10-20 Thread Peter J. Holzer
On 2018-10-16 06:37:56 +1100, Chris Angelico wrote: > On Tue, Oct 16, 2018 at 6:34 AM Peter J. Holzer wrote: > > On 2018-10-15 14:12:54 +0200, Antoon Pardon wrote: > > > On 13-10-18 09:37, Peter J. Holzer wrote: > > > > On 2018-10-09 09:55:34 +0200, Antoon Pardon wrote: > > > >> On 08-10-18

Re: Python indentation (3 spaces)

2018-10-15 Thread Ethan Furman
On 10/15/2018 12:37 PM, Chris Angelico wrote: On Tue, Oct 16, 2018 at 6:34 AM Peter J. Holzer wrote: On 2018-10-15 14:12:54 +0200, Antoon Pardon wrote: Spaces that replaced a tab by accident, are easy to catch too. They are all those lines that show up when you do a diff with the previous

Re: Python indentation (3 spaces)

2018-10-15 Thread Chris Angelico
On Tue, Oct 16, 2018 at 9:16 AM D'Arcy Cain wrote: > > On 10/15/18 5:54 PM, Gregory Ewing wrote: > > Cameron Simpson wrote: > >> I can't express how pleasing it is to see the traditional vi-vs-emacs > >> wars supplanted by emacs-vs-emacs :-) > > > > We're the People's Front of Emacs, not the

Re: Python indentation (3 spaces)

2018-10-15 Thread D'Arcy Cain
On 10/15/18 5:54 PM, Gregory Ewing wrote: > Cameron Simpson wrote: >> I can't express how pleasing it is to see the traditional vi-vs-emacs >> wars supplanted by emacs-vs-emacs :-) > > We're the People's Front of Emacs, not the Emacs People's Front! I thought we were the People's Emacs Front.

Re: Python indentation (3 spaces)

2018-10-15 Thread Gregory Ewing
Cameron Simpson wrote: I can't express how pleasing it is to see the traditional vi-vs-emacs wars supplanted by emacs-vs-emacs :-) We're the People's Front of Emacs, not the Emacs People's Front! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Python indentation (3 spaces)

2018-10-15 Thread Chris Angelico
On Tue, Oct 16, 2018 at 8:03 AM Cameron Simpson wrote: > > > [ Marko and Rhdri discussing emacs indentation modes ... ] > > I can't express how pleasing it is to see the traditional vi-vs-emacs > wars supplanted by emacs-vs-emacs :-) > Which editor should I use - vi in emacs mode, or emacs in vi

Re: Python indentation (3 spaces)

2018-10-15 Thread Cameron Simpson
[ Marko and Rhdri discussing emacs indentation modes ... ] I can't express how pleasing it is to see the traditional vi-vs-emacs wars supplanted by emacs-vs-emacs :-) Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Python indentation (3 spaces)

2018-10-15 Thread Chris Angelico
On Tue, Oct 16, 2018 at 6:34 AM Peter J. Holzer wrote: > > On 2018-10-15 14:12:54 +0200, Antoon Pardon wrote: > > On 13-10-18 09:37, Peter J. Holzer wrote: > > > On 2018-10-09 09:55:34 +0200, Antoon Pardon wrote: > > >> On 08-10-18 19:43, Peter J. Holzer wrote: > > >>> In practice it doesn't work

Re: Python indentation (3 spaces)

2018-10-15 Thread Peter J. Holzer
On 2018-10-15 14:12:54 +0200, Antoon Pardon wrote: > On 13-10-18 09:37, Peter J. Holzer wrote: > > On 2018-10-09 09:55:34 +0200, Antoon Pardon wrote: > >> On 08-10-18 19:43, Peter J. Holzer wrote: > >>> In practice it doesn't work in my experience. There is always someone in > >>> a team who was

Re: Python indentation (3 spaces)

2018-10-15 Thread Peter J. Holzer
On 2018-10-15 12:06:06 +0100, Rhodri James wrote: > On 14/10/18 09:06, Peter J. Holzer wrote: > > If everybody used tabs, why would anyone care about your tab width? > > Unless they look over your shoulder while you are typing, they won't > > even know how wide your tabs are. > > If you used

Re: Python indentation (3 spaces)

2018-10-15 Thread Peter J. Holzer
On 2018-10-15 09:49:12 +1100, Cameron Simpson wrote: > On 15Oct2018 00:33, Peter J. Holzer wrote: > > On 2018-10-15 09:06:11 +1100, Chris Angelico wrote: > > > On Mon, Oct 15, 2018 at 8:56 AM Marko Rauhamaa wrote: > > > > Chris Angelico : > > > > > Tabs for indentation have semantic meaning.

Re: Python indentation (3 spaces)

2018-10-15 Thread Rhodri James
On 15/10/18 16:41, Marko Rauhamaa wrote: Rhodri James : On 15/10/18 12:28, Marko Rauhamaa wrote: Try running emacs -q abc.c and observe the indentation depth. """User Option: c-basic-offset This style variable holds the basic offset between indentation levels. It's factory

Re: Python indentation (3 spaces)

2018-10-15 Thread Marko Rauhamaa
Rhodri James : > On 15/10/18 12:28, Marko Rauhamaa wrote: >> Try running >> >> emacs -q abc.c >> >> and observe the indentation depth. > > """User Option: c-basic-offset > > This style variable holds the basic offset between indentation > levels. It's factory default is 4, but all the

Re: Python indentation (3 spaces)

2018-10-15 Thread Rhodri James
On 15/10/18 12:28, Marko Rauhamaa wrote: Rhodri James : On 15/10/18 05:45, Marko Rauhamaa wrote: The two-space indentation is the out-of-the-box default for emacs. Ahem. It's the default for certain C styles. It's not even the default for C-mode itself, which is 4. You must be running a

Re: Python indentation (3 spaces)

2018-10-15 Thread Antoon Pardon
On 13-10-18 09:37, Peter J. Holzer wrote: > On 2018-10-09 09:55:34 +0200, Antoon Pardon wrote: >> On 08-10-18 19:43, Peter J. Holzer wrote: >>> On 2018-10-08 10:36:21 +1100, Chris Angelico wrote: How wide my indents are on my screen shouldn't influence your screen or your choices. >>>

Re: Python indentation (3 spaces)

2018-10-15 Thread Marko Rauhamaa
Rhodri James : > On 15/10/18 05:45, Marko Rauhamaa wrote: >> The two-space indentation is the out-of-the-box default for emacs. > > Ahem. It's the default for certain C styles. It's not even the default > for C-mode itself, which is 4. You must be running a different version of emacs than all

Re: Python indentation (3 spaces)

2018-10-15 Thread Rhodri James
On 15/10/18 05:45, Marko Rauhamaa wrote: Chris Angelico : I'm saying I have never seen is this: On Mon, Oct 15, 2018 at 8:56 AM Marko Rauhamaa wrote: However, it is trumped by an older convention whereby the indentation levels go as follows: 0: 1: SPC SPC 2: SPC SPC SPC SPC

Re: Python indentation (3 spaces)

2018-10-15 Thread Rhodri James
On 14/10/18 09:06, Peter J. Holzer wrote: On 2018-10-14 00:45:49 +, Grant Edwards wrote: On 2018-10-13, Peter J. Holzer wrote: For "just use tabs" to work, all of those tools would have to magically recognize that they're looking at Python source and adjust the tab size accordingly.

Re: Python indentation (3 spaces)

2018-10-15 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Oct 15, 2018 at 3:51 PM Marko Rauhamaa wrote: > I don't understand your point here. It prints a letter, then some > spaces, then a tab, then another letter. On my terminal, that displays > the tab by advancing to the next tab position. If I highlight to > select, it's

Re: Python indentation (3 spaces)

2018-10-14 Thread Chris Angelico
On Mon, Oct 15, 2018 at 3:51 PM Marko Rauhamaa wrote: > The two-space indentation is the out-of-the-box default for emacs. > However, the tab collapsing principle is a universal default. If you go > against it, you will have to educate more tools than your editor. For > example, try running this

Re: Python indentation (3 spaces)

2018-10-14 Thread Marko Rauhamaa
Chris Angelico : > I'm saying I have never seen is this: > > On Mon, Oct 15, 2018 at 8:56 AM Marko Rauhamaa wrote: >> However, it is trumped by an older >> convention whereby the indentation levels go as follows: >> >>0: >>1: SPC SPC >>2: SPC SPC SPC SPC >>3: SPC SPC SPC SPC SPC

Re: Python indentation (3 spaces)

2018-10-14 Thread Chris Angelico
On Mon, Oct 15, 2018 at 2:51 PM Alan Bawden wrote: > > Chris Angelico writes: > > On Mon, Oct 15, 2018 at 9:56 AM Alan Bawden wrote: > > > In my experience this is a very common way to assume that tabs will be > > > interpreted. Virtually every source-code file I have encountered since > > >

Re: Python indentation (3 spaces)

2018-10-14 Thread Alan Bawden
Chris Angelico writes: > On Mon, Oct 15, 2018 at 9:56 AM Alan Bawden wrote: > > In my experience this is a very common way to assume that tabs will be > > interpreted. Virtually every source-code file I have encountered since the > > mid 1970s (for any programming language or operating system)

Re: Python indentation (3 spaces)

2018-10-14 Thread Chris Angelico
On Mon, Oct 15, 2018 at 9:56 AM Alan Bawden wrote: > In my experience this is a very common way to assume that tabs will be > interpreted. Virtually every source-code file I have encountered since the > mid 1970s (for any programming language or operating system) has assumed > either this

Re: Python indentation (3 spaces)

2018-10-14 Thread Alan Bawden
Chris Angelico writes: > On Mon, Oct 15, 2018 at 8:56 AM Marko Rauhamaa wrote: > > Chris Angelico : ... > > That *could* be the situation. However, it is trumped by an older > > convention whereby the indentation levels go as follows: > > > >0: > >1: SPC SPC > >2: SPC SPC SPC SPC > >

Re: Python indentation (3 spaces)

2018-10-14 Thread Cameron Simpson
On 15Oct2018 00:33, Peter J. Holzer wrote: On 2018-10-15 09:06:11 +1100, Chris Angelico wrote: On Mon, Oct 15, 2018 at 8:56 AM Marko Rauhamaa wrote: > Chris Angelico : > > Tabs for indentation have semantic meaning. Top-level has zero tabs. > > One indentation level is represented by one tab.

Re: Python indentation (3 spaces)

2018-10-14 Thread Peter J. Holzer
On 2018-10-15 09:06:11 +1100, Chris Angelico wrote: > On Mon, Oct 15, 2018 at 8:56 AM Marko Rauhamaa wrote: > > Chris Angelico : > > > Tabs for indentation have semantic meaning. Top-level has zero tabs. > > > One indentation level is represented by one tab. Two indentation > > > levels? Two

Re: Python indentation (3 spaces)

2018-10-14 Thread Chris Angelico
On Mon, Oct 15, 2018 at 8:56 AM Marko Rauhamaa wrote: > > Chris Angelico : > > > Tabs for indentation have semantic meaning. Top-level has zero tabs. > > One indentation level is represented by one tab. Two indentation > > levels? Two tabs. It's about as perfect a representation as you could > >

Re: Python indentation (3 spaces)

2018-10-14 Thread Marko Rauhamaa
Chris Angelico : > Tabs for indentation have semantic meaning. Top-level has zero tabs. > One indentation level is represented by one tab. Two indentation > levels? Two tabs. It's about as perfect a representation as you could > hope for. If you like your indentation levels to be as wide as four

Re: Python indentation (3 spaces)

2018-10-14 Thread Chris Angelico
On Mon, Oct 15, 2018 at 1:35 AM Grant Edwards wrote: > > On 2018-10-14, Christian Gollwitzer wrote: > > Am 14.10.18 um 02:45 schrieb Grant Edwards: > >> On 2018-10-13, Peter J. Holzer wrote: > >>> > For "just use tabs" to work, all of those tools would have to > magically recognize

Re: Python indentation (3 spaces)

2018-10-14 Thread Grant Edwards
On 2018-10-14, Christian Gollwitzer wrote: > Am 14.10.18 um 02:45 schrieb Grant Edwards: >> On 2018-10-13, Peter J. Holzer wrote: >>> For "just use tabs" to work, all of those tools would have to magically recognize that they're looking at Python source and adjust the tab size

Re: Python indentation (3 spaces)

2018-10-14 Thread Peter J. Holzer
On 2018-10-14 00:45:49 +, Grant Edwards wrote: > On 2018-10-13, Peter J. Holzer wrote: > > > >> For "just use tabs" to work, all of those tools would have to > >> magically recognize that they're looking at Python source and adjust > >> the tab size accordingly. That isn't going to happen. >

Re: Python indentation (3 spaces)

2018-10-14 Thread Christian Gollwitzer
Am 14.10.18 um 02:45 schrieb Grant Edwards: On 2018-10-13, Peter J. Holzer wrote: For "just use tabs" to work, all of those tools would have to magically recognize that they're looking at Python source and adjust the tab size accordingly. That isn't going to happen. Well, no. The idea of

Re: Python indentation (3 spaces)

2018-10-13 Thread Grant Edwards
On 2018-10-13, Peter J. Holzer wrote: > >> For "just use tabs" to work, all of those tools would have to >> magically recognize that they're looking at Python source and adjust >> the tab size accordingly. That isn't going to happen. > > Well, no. The idea of "just use tabs" isn't have a

Re: Python indentation (3 spaces)

2018-10-13 Thread Peter J. Holzer
On 2018-10-09 09:55:34 +0200, Antoon Pardon wrote: > On 08-10-18 19:43, Peter J. Holzer wrote: > > On 2018-10-08 10:36:21 +1100, Chris Angelico wrote: > >> How wide my indents are on my screen shouldn't influence your screen > >> or your choices. > > Theoretically I would agree with you: Just use

Re: Python indentation (3 spaces)

2018-10-13 Thread Peter J. Holzer
On 2018-10-08 20:13:38 +, Grant Edwards wrote: > On 2018-10-08, Peter J. Holzer wrote: > > Theoretically I would agree with you: Just use a single tab per > > indentation level and let the user decide whether that's displayed > > as 2, 3, 4, or 8 spaces or 57 pixels or whatever. > > > > In

Re: Python indentation (3 spaces)

2018-10-09 Thread Antoon Pardon
On 08-10-18 19:43, Peter J. Holzer wrote: > On 2018-10-08 10:36:21 +1100, Chris Angelico wrote: >> TBH, I think that tab width should be up to the display, just like the >> font. You're allowed to view code in any font that makes sense for >> you, and you should be able to view code with any

Re: Python indentation (3 spaces)

2018-10-08 Thread Chris Angelico
On Tue, Oct 9, 2018 at 9:06 AM Marko Rauhamaa wrote: > > Thomas Jollans : > > > On 08/10/2018 08:31, Marko Rauhamaa wrote: > >> Where I work (and at home), the only control character that is allowed > >> in source code is LF. > > > > No tolerance for form feeds? > > None whatsoever. > > CR is ok

Re: Python indentation (3 spaces)

2018-10-08 Thread Marko Rauhamaa
Thomas Jollans : > On 08/10/2018 08:31, Marko Rauhamaa wrote: >> Where I work (and at home), the only control character that is allowed >> in source code is LF. > > No tolerance for form feeds? None whatsoever. CR is ok but only if immediately followed by BEL. That way typing source code gives

Re: Python indentation (3 spaces)

2018-10-08 Thread Thomas Jollans
On 08/10/2018 08:31, Marko Rauhamaa wrote: Chris Angelico : How wide my indents are on my screen shouldn't influence your screen or your choices. Where I work (and at home), the only control character that is allowed in source code is LF. No tolerance for form feeds? --

Re: Python indentation (3 spaces)

2018-10-08 Thread Grant Edwards
On 2018-10-08, Peter J. Holzer wrote: > Theoretically I would agree with you: Just use a single tab per > indentation level and let the user decide whether that's displayed > as 2, 3, 4, or 8 spaces or 57 pixels or whatever. > > In practice it doesn't work in my experience. Nor in mine. On

Re: Python indentation (3 spaces)

2018-10-08 Thread Marko Rauhamaa
Chris Angelico : > How wide my indents are on my screen shouldn't influence your screen > or your choices. Where I work (and at home), the only control character that is allowed in source code is LF. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Python indentation (3 spaces)

2018-10-08 Thread Chris Angelico
On Tue, Oct 9, 2018 at 4:44 AM Peter J. Holzer wrote: > > On 2018-10-08 10:36:21 +1100, Chris Angelico wrote: > > TBH, I think that tab width should be up to the display, just like the > > font. You're allowed to view code in any font that makes sense for > > you, and you should be able to view

Re: Python indentation (3 spaces)

2018-10-08 Thread Peter J. Holzer
On 2018-10-08 10:36:21 +1100, Chris Angelico wrote: > TBH, I think that tab width should be up to the display, just like the > font. You're allowed to view code in any font that makes sense for > you, and you should be able to view code with any indentation that > makes sense for you. If someone

Re: Python indentation (3 spaces)

2018-10-08 Thread Rhodri James
On 05/10/18 21:48, 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 of

Re: Python indentation (3 spaces)

2018-10-08 Thread Thomas Jollans
On 08/10/2018 03:13, Gene Heskett wrote: 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

Re: Python indentation (3 spaces)

2018-10-08 Thread Ben Finney
Terry Reedy writes: > You assumption that a tab means '4 spaces' is wrong. A tab means > 'jump to the next tab stop'. On 10 char/inch US typewriters, tab > stops were initially set to every 5 spaces or 1/2 inch. In terminals > and code editors, virtual tab stops were often set to every 8

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,

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

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;

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

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

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

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

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

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

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

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

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
, 2018 10:35 AM To: python-list@python.org Subject: Re: Python indentation (3 spaces) 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 edit

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:

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

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

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

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

Re: Python indentation (3 spaces)

2018-10-06 Thread Chris Green
Terry Reedy wrote: > 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

Re: Python indentation (3 spaces)

2018-10-05 Thread Ryan Johnson
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 the same development

Re: Python indentation (3 spaces)

2018-10-05 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-05 Thread Chris Angelico
On Sat, Oct 6, 2018 at 7:25 AM Serhiy Storchaka wrote: > > 05.10.18 23:53, Chris Angelico пише: > > I don't understand how three spaces would prevent errors in a way that > > four wouldn't. > In many editors and on terminal > > for a in x: > if a: > b() > <-tab-->c() > > looks

Re: Python indentation (3 spaces)

2018-10-05 Thread Karsten Hilbert
On Sat, Oct 06, 2018 at 12:23:49AM +0300, Serhiy Storchaka wrote: > > I don't understand how three spaces would prevent errors in a way that > > four wouldn't. > In many editors and on terminal > > for a in x: > if a: > b() > <-tab-->c() > > looks indistinguishable from > > for a

Re: Python indentation (3 spaces)

2018-10-05 Thread Serhiy Storchaka
05.10.18 23:53, Chris Angelico пише: I don't understand how three spaces would prevent errors in a way that four wouldn't. In many editors and on terminal for a in x: if a: b() <-tab-->c() looks indistinguishable from for a in x: if a: b() c() but the former

Re: Python indentation (3 spaces)

2018-10-05 Thread Chris Angelico
On Sat, Oct 6, 2018 at 6:51 AM 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"