Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74164
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Marko Rauhamaa <marko@pacujo.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: PEP8 and 4 spaces |
| Date | Tue, 08 Jul 2014 14:13:09 +0300 |
| Organization | A noiseless patient Spider |
| Lines | 52 |
| Message-ID | <874mysgl2y.fsf@elektro.pacujo.net> (permalink) |
| References | <53B59358.2040404@tobiah.org> <CAGGBd_rOg+EX1OxryW9-6+2b6yqzzKL9xN1K7+TPSP77tJz=bQ@mail.gmail.com> <mailman.11567.1404694875.18130.python-list@python.org> <lpdbjc$qf7$1@dont-email.me> <mailman.11614.1404782560.18130.python-list@python.org> <53bbb047$0$2926$c3e8da3$76491128@news.astraweb.com> <87a98kgqsm.fsf@elektro.pacujo.net> <mailman.11620.1404815310.18130.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="9587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jVt3RNlwN70oqaYh+y7tc" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
| Cancel-Lock | sha1:d8zAbmKsXC//4MMAp0OhZAyfq7k= sha1:xQzCthFtEE//tR1z9Yoo66BnoWo= |
| Xref | csiph.com comp.lang.python:74164 |
Show key headers only | View raw
Chris Angelico <rosuav@gmail.com>:
> Not quite; tools like diff that put a character at the beginning of
> the line are likely to be tab-aware,
No, just tried it again: diff outputs tabs as tabs.
$ diff abc def
1,2c1,2
< abc
< abc
---
> def
> def
where line 1 begins with a tab and line 2 begins with 8 spaces in each
file.
> and gcc is certainly going to comprehend them
$ gcc -c test.c
test.c:1:2: error: expected identifier or ‘(’ at end of input
where test.c contains
<TAB>(<LF>
IOW, gcc reports that the open parenthesis is in column 2.
> (at least to the extent of treating them as whitespace).
Sure, but that doesn't concern the tab stops in any way.
> And I think less takes notice of them, too,
How?
> so it's only the very simplest tools like cat that actually ignore
> them or treat them as single characters (or even bytes).
They all seem to be "simple." At least Python is:
$ python3 -c 'print ('
File "<string>", line 1
print (
^
SyntaxError: unexpected EOF while parsing
where the caret is pointing at the wrong visual column.
Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: PEP8 and 4 spaces Ben Finney <ben@benfinney.id.au> - 2014-07-07 11:00 +1000
Re: PEP8 and 4 spaces Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-07 02:28 +0000
Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-07 12:50 +1000
Re: PEP8 and 4 spaces Dan Sommers <dan@tombstonezero.net> - 2014-07-07 05:35 +0000
Re: PEP8 and 4 spaces Ben Finney <ben@benfinney.id.au> - 2014-07-08 11:22 +1000
Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-08 00:03 -0700
Re: PEP8 and 4 spaces Steven D'Aprano <steve@pearwood.info> - 2014-07-08 08:48 +0000
Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-08 19:05 +1000
Re: PEP8 and 4 spaces Marko Rauhamaa <marko@pacujo.net> - 2014-07-08 12:09 +0300
Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-08 20:28 +1000
Re: PEP8 and 4 spaces Marko Rauhamaa <marko@pacujo.net> - 2014-07-08 14:13 +0300
Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-08 21:37 +1000
Re: PEP8 and 4 spaces Ben Finney <ben@benfinney.id.au> - 2014-07-09 12:41 +1000
Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-09 01:19 -0700
csiph-web