Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34041
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; '-*-': 0.07; 'parsing': 0.07; 'python': 0.09; 'instance.': 0.09; 'lines:': 0.09; 'encoding': 0.15; 'file,': 0.15; 'backward': 0.16; 'declaration': 0.16; 'directive': 0.16; 'encodings': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'indent': 0.16; 'set,': 0.16; 'subject: \n ': 0.16; 'subject:fails': 0.16; 'subject:when': 0.16; 'tabs': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'code.': 0.20; 'received:209.85.214.174': 0.21; 'setting': 0.26; 'am,': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'subject:/': 0.28; "d'aprano": 0.29; 'editors': 0.29; 'indentation': 0.29; 'spaces': 0.29; 'steven': 0.29; 'character': 0.29; 'source': 0.29; 'code': 0.31; 'could': 0.32; 'mixed': 0.33; 'to:addr:python-list': 0.33; 'that,': 0.34; 'received:google.com': 0.34; 'consistent': 0.35; 'nov': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'but': 0.36; 'subject: (': 0.36; 'turn': 0.36; 'editor': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'respect': 0.63; 'worth': 0.63; 'of:': 0.65; "else's": 0.84; 'subject:else': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=o+teSgrIY/690Rze3jloQuKME37pbF3M/c+WHd7u4FE=; b=Ma6OB/88nAGSVjCXN/t5YSBravBHNnux6aIEP8lvGG5mJxBgzoT5ehorZDoEBIVWJ7 eFAs4jeBV6xkpyvSVv+tk3y3/wLQPTVXTPw1jh0HGqXxaUJmiQ5iND8QWGTgysg8c8C3 wfEC2d/lzIu+PNaZ1juzZlCqBGp5UtXgN5pYnBs6qM8uX/HbGhpFS/JZnIZrqyw2r7hW 5AzGb1HldiKy6vG+5b9Uf2II68GpGrnWygxy78XXNsD1TWU6zUY3KCCVmK89IuH5GbX2 qnolJvGtJFtznaGaPhNeiSRMZ97exfPEEyfLbH5n3mt8VHNvzBCLx4pTqXDusagan06K lryw== |
| MIME-Version | 1.0 |
| Date | Thu, 29 Nov 2012 10:04:55 +1100 |
| Subject | Tabs/spaces for indentation (was Re: re.search when used within an if/else fails) |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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 | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.350.1354143899.29569.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1354143899 news.xs4all.nl 6901 [2001:888:2000:d::a6]:55914 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:34041 |
Show key headers only | View raw
On Thu, Nov 29, 2012 at 8:39 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Perhaps it would be nice if Python honoured a directive setting indent > style to spaces or indents, as it honours source code encoding lines: > > # -*- indent: <mode> -*- > > Where <mode> could be one of: > > space[s] Only accept spaces in indentation > tab[s] Only accept tabs in indentation > mixed Accept "mixed" tabs and spaces, but only if consistent > > with mixed the default for backward compatibility. I don't know that it needs to be a declaration like that; character encodings are critical to parsing the file, but newline-followed-by-tab and newline-followed-by-space are unambiguous. But it would be of value to have something like that, as editors could then be configured to respect it - set the editor to turn tab-key into N spaces but only if "indent tab" is not set, for instance. The question is, is it worth it? The main value would be when you're editing someone else's code. ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Tabs/spaces for indentation (was Re: re.search when used within an if/else fails) Chris Angelico <rosuav@gmail.com> - 2012-11-29 10:04 +1100
csiph-web