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


Groups > comp.lang.python > #82035

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

From Ned Batchelder <ned@nedbatchelder.com>
Subject Re: Tabs for indentation & Spaces for alignment in Python 3?
Date 2014-12-05 22:34 -0500
References <CAFaCOgzqxcvuKBrcSkK+DRm-5pHuh6QCXi1PKG4LHGqdBjLF_A@mail.gmail.com> <m5tpqg$iqi$1@ger.gmane.org> <54827250.5060907@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16651.1417836850.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 12/5/14 10:04 PM, Michael Torrie wrote:
> On 12/05/2014 07:31 PM, Ned Batchelder wrote:
>> This is a perfect example!  The code (with tabs as >--- and leading
>> spaces as .) is:
>>
>>    >-------if (!list_empty(pending))
>>    >------->-------ret = list_first_entry(pending, struct async_entry,
>>    >------->------->------->-------.......domain_list)->cookie;
>>
>> Now, display it in your editor with tabs set to four spaces:
>>
>>    >---if (!list_empty(pending))
>>    >--->---ret = list_first_entry(pending, struct async_entry,
>>    >--->--->--->---.......domain_list)->cookie;
>
> However, a conscientious programmer knows that tabs could be arbitrarily
> sized, so he would never do that.

The Linux kernel style guide makes clear: tabs are not arbitrarily 
sized. In the Linux kernel, they are eight spaces.

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

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


Thread

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

csiph-web