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


Groups > comp.lang.python > #96531

Auto indents (was Re: How to set the history commands visible ?)

Path csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.roellig-ltd.de!open-news-network.org!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:How': 0.09; 'closed.': 0.09; 'cursor': 0.09; 'indicates': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:set': 0.09; 'jan': 0.11; 'syntax': 0.13; "':'": 0.16; 'buggy': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.16; 'code.': 0.23; 'implemented': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; 'looks': 0.29; 'indentation': 0.29; 'pep': 0.29; 'usually': 0.33; 'idle': 0.33; 'editor': 0.34; 'there': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'end': 0.39; 'does': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'opener': 0.84; 'subject:commands': 0.84; 'subject:history': 0.84; 'received:fios.verizon.net': 0.91; 'subject:Auto': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Auto indents (was Re: How to set the history commands visible ?)
Date Sun, 13 Sep 2015 18:56:23 -0400
References <CAGFvGiMenX=AEsmEFw4+X-W2E5rgWGrK8Fgi-xgFT4SNFjZK4Q@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-59-124-74.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
In-Reply-To <CAGFvGiMenX=AEsmEFw4+X-W2E5rgWGrK8Fgi-xgFT4SNFjZK4Q@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.504.1442185028.8327.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1442185028 news.xs4all.nl 23768 [2001:888:2000:d::a6]:44053
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:96531

Show key headers only | View raw


On 9/13/2015 1:15 PM, Glus Xof wrote:

> Is yet an automatic indentation system implemented ?

The Idle editor does pep8-aware 'smart indenting'.  In the following, 
'|' indicates the cursor position after <Enter> is pressed.
A ':' at the end of the line adds 1 indent -- unless there is an opener 
that has not been closed.  So what looks like a buggy indent usually 
indicates a syntax error in the user code.

a = 3
|
if a == 3:
     |pass
a = int(len({})
         |) # pep 8 positioning
a = int(
     |) # pep 8 positioning
if a = 3:
     if b = 5:
         |pass
if a == int(len({}):
             | # unclosed int(

-- 
Terry Jan Reedy

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


Thread

Auto indents (was Re: How to set the history commands visible ?) Terry Reedy <tjreedy@udel.edu> - 2015-09-13 18:56 -0400

csiph-web