Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82042
| Date | 2014-12-06 10:26 -0700 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: Tabs for indentation & Spaces for alignment in Python 3? |
| References | (1 earlier) <m5tpqg$iqi$1@ger.gmane.org> <mailman.16650.1417835105.18130.python-list@python.org> <87mw71maqu.fsf@elektro.pacujo.net> <mailman.16653.1417884132.18130.python-list@python.org> <87d27wlnr4.fsf@elektro.pacujo.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16655.1417886776.18130.python-list@python.org> (permalink) |
On 12/06/2014 09:57 AM, Marko Rauhamaa wrote: >> And one of the OP's points is that by using tabs for indent, and >> spaces for alignment, you can have the best of both worlds. > > I certainly doesn't sound that way. Why is that? > >> Programmers can set their tab size to anything they want, and it still >> looks good > > That's anything but true. I see zigzaggy diffs all the time. You're not reading what I'm writing, at least understanding it. The idea behind using tabs for indent and spaces for alignment are clear enough: >------->-------blah (one, >------->-------......two So obviously your zigzaggy diffs are showing that the person who wrote the code is *not* using tabs for indent and spaces for alignment. Must just be using tabs. Since tabs and spaces are not visibly distinguished, it's not readily apparent when one is properly using tabs and spaces together, and not apparent that your editor is doing it properly, so in Python most people recommend never mixing tabs and spaces, although you *can* do that in the way I've described if you really want to.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Tabs for indentation & Spaces for alignment in Python 3? Michael Torrie <torriem@gmail.com> - 2014-12-05 20:04 -0700
Re: Tabs for indentation & Spaces for alignment in Python 3? Marko Rauhamaa <marko@pacujo.net> - 2014-12-06 10:40 +0200
Re: Tabs for indentation & Spaces for alignment in Python 3? Michael Torrie <torriem@gmail.com> - 2014-12-06 09:41 -0700
Re: Tabs for indentation & Spaces for alignment in Python 3? Marko Rauhamaa <marko@pacujo.net> - 2014-12-06 18:57 +0200
Re: Tabs for indentation & Spaces for alignment in Python 3? Michael Torrie <torriem@gmail.com> - 2014-12-06 10:26 -0700
Re: Tabs for indentation & Spaces for alignment in Python 3? Marko Rauhamaa <marko@pacujo.net> - 2014-12-06 22:04 +0200
Re: Tabs for indentation & Spaces for alignment in Python 3? Chris Angelico <rosuav@gmail.com> - 2014-12-07 03:46 +1100
csiph-web