Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73989
| References | (1 earlier) <CAPTjJmqv_-89sV+X3VX03yAEXT43RgfBbcYL0W3GOLRCWGwYjQ@mail.gmail.com> <mailman.11466.1404410853.18130.python-list@python.org> <53b6019f$0$29985$c3e8da3$5496439d@news.astraweb.com> <c1n1fbFi6omU1@mid.individual.net> <lp6rqg$7ei$1@ger.gmane.org> |
|---|---|
| From | Travis Griggs <travisgriggs@gmail.com> |
| Subject | Re: PEP8 and 4 spaces |
| Date | 2014-07-05 00:51 -0700 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11517.1404546716.18130.python-list@python.org> (permalink) |
> On Jul 4, 2014, at 11:29, Lie Ryan <lie.1296@gmail.com> wrote: > >> On 04/07/14 07:55, Gregory Ewing wrote: >> Steven D'Aprano wrote: >> >>>> That's exactly the problem with tabs - whatever you think your code >>>> looks like with tabs, other people will see quite different picture. >>> >>> Why do you consider this a problem? >> >> It's a problem if you try to use tabs for lining things >> up in a tabular fashion in your source code. >> >> The solution is not to use tabs for that -- only use >> tabs for indentation, and use spaces for everything >> else. Or, as PEP 8 suggests, don't try to line things >> up in the first place. > > PEP8 suggests using this style of method invocation: > > obj.method(foo, > bar, > baz) > > which is an effect impossible to do correctly with tabs alone. If you want to follow this style strictly, you end up having to either mix tabs and spaces, or just use spaces, or as I prefer it, avoid the issue altogether: > > obj.method( > foo, > bar, > baz, > ) Ok, here's irony. I'm looking at that thinking "what the heck is he talking about?!?". And then my brain catches up. My mail reader is of course "modern" and does not use a mono space font. So the value of the along ed indent is lost anyway. But wasn't that what spaces were supposed to give us over tabs, some separation from the trading betwixt different editors? Chuckle. Travis Griggs
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: PEP8 and 4 spaces Paul Sokolovsky <pmiscml@gmail.com> - 2014-07-03 21:07 +0300
Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-03 12:22 -0700
Re: PEP8 and 4 spaces Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-04 01:21 +0000
Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-04 11:30 +1000
Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-03 21:37 -0400
Re: PEP8 and 4 spaces Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-07-04 18:55 +1200
Re: PEP8 and 4 spaces Lie Ryan <lie.1296@gmail.com> - 2014-07-04 19:29 +0100
Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-04 15:04 -0400
Re: PEP8 and 4 spaces Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-04 20:50 +0100
Re: PEP8 and 4 spaces Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-07-05 11:17 +1200
Re: PEP8 and 4 spaces Tim Chase <python.list@tim.thechases.com> - 2014-07-04 18:35 -0500
Re: PEP8 and 4 spaces Travis Griggs <travisgriggs@gmail.com> - 2014-07-05 00:51 -0700
csiph-web