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


Groups > comp.lang.python > #82023 > unrolled thread

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

Started byNed Batchelder <ned@nedbatchelder.com>
First post2014-12-05 16:34 -0500
Last post2014-12-05 16:34 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Tabs for indentation & Spaces for alignment in Python 3? Ned Batchelder <ned@nedbatchelder.com> - 2014-12-05 16:34 -0500

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

FromNed Batchelder <ned@nedbatchelder.com>
Date2014-12-05 16:34 -0500
SubjectRe: Tabs for indentation & Spaces for alignment in Python 3?
Message-ID<mailman.16641.1417815258.18130.python-list@python.org>
On 12/5/14 1:49 PM, Aahan Krish 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)

(Aside from the fact that that isn't Python syntax *at all*), Python 3 
would be OK with that indentation. It wouldn't be OK with mixed tabs and 
spaces where the meaning depends on the indent width of a tab, but here 
it does not.

I sincerely hope no one is seriously considering trying to maintain code 
using a mix of tabs and spaces like that.  That's a nightmare.

-- 
Ned Batchelder, http://nedbatchelder.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web