Tabs for indentation & Spaces for alignment in Python 3?

Ian Kelly ian.g.kelly at gmail.com
Fri Dec 5 17:54:15 EST 2014


On Fri, Dec 5, 2014 at 11:49 AM, Aahan Krish <krish at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141205/4ce7fe2e/attachment.html>


More information about the Python-list mailing list