Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82026

Re: Tabs for indentation & Spaces for alignment in Python 3?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.059
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'subject:Python': 0.06; 'continuation': 0.07; 'spaces': 0.09; 'python': 0.11; 'is).': 0.16; 'likewise': 0.16; 'tabs': 0.16; 'wrote:': 0.18; 'example': 0.22; 'saying': 0.22; '&gt;': 0.26; 'second': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; '(used': 0.31; 'fine,': 0.31; 'indentation': 0.31; 'fri,': 0.33; 'third': 0.33; 'actual': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'subject:?': 0.36; 'should': 0.36; 'so,': 0.37; 'to:addr:python-list': 0.38; 'skip:- 10': 0.38; 'to:addr:python.org': 0.39; 'first': 0.61; 'line,': 0.68; 'where:': 0.68; 'subject: & ': 0.68; '--->': 0.84; 'fourth': 0.84; 'ian,': 0.84; 'krish': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=dBKQRBsNwpj+V67nMRpkJ1GpAqgpYRWl9v6QS7DYBmw=; b=zRL8aAqN1hil0M/27BlEJqQU+Yiy+lb8a3dmxICHTgtFdPKgGC2Vv7yyARjIKMfq4F VzsUVzxuPU6Dp4HTTIKSgbVMtWmAhCnMrNbFHpaysxSQAjm/QCrDFHFgPZwctPjzcwx8 PYUOuSgTHm7OomohTwxb//JuGstpY0xb3xYio5IMdhzVZkHU99FmduZoTg+a3MekI2bU eKs3bR90fZYsNaVDgy4AlJFvxP85e9P7wFQZVbBr6ci37Vcqr4C0LkyP/ovp+Nld16Kv CZe0AqFRZ+xPa4vL7zriWqsG8B/O4Q/IAhV/tJc2gb7ybFvAYSWnakaZ5yzGCGdZF3S/ FHDg==
X-Received by 10.66.245.167 with SMTP id xp7mr31561532pac.134.1417820095463; Fri, 05 Dec 2014 14:54:55 -0800 (PST)
MIME-Version 1.0
In-Reply-To <CAFaCOgxQvq0TmS7G3f_bZ8HV+eUGSh5DSZiGxi7KhL_Yfp6Zdg@mail.gmail.com>
References <CAFaCOgxQvq0TmS7G3f_bZ8HV+eUGSh5DSZiGxi7KhL_Yfp6Zdg@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Fri, 5 Dec 2014 15:54:15 -0700
Subject Re: Tabs for indentation & Spaces for alignment in Python 3?
To Python <python-list@python.org>
Content-Type multipart/alternative; boundary=047d7b1117c92546f105097ff7d1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16642.1417820104.18130.python-list@python.org> (permalink)
Lines 46
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1417820104 news.xs4all.nl 2851 [2001:888:2000:d::a6]:57807
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82026

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Dec 5, 2014 at 11:49 AM, Aahan Krish <krish@aahan.me> wrote:
>
> Hello Ian,
>
> So, wrt Q2, what you are saying is, the following would cause issues in
Python 3?
>
>     int f(int x,
>     ......int y) {
>     --->return g(x,
>     --->.........y);
>     }
>
> Where:
>
> ---> for tabs (used for indentation)
> .... for spaces (used for alignment)

That example should be fine, I think (if it were actually Python  and not
C, that is). The second line is a continuation of the first line, so the
preceding whitespace isn't indentation and doesn't matter. Likewise for the
fourth line. So the only line with any actual indentation there is the
third line.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Tabs for indentation & Spaces for alignment in Python 3? Ian Kelly <ian.g.kelly@gmail.com> - 2014-12-05 15:54 -0700

csiph-web