Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96531
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Auto indents (was Re: How to set the history commands visible ?) |
| Date | 2015-09-13 18:56 -0400 |
| References | <CAGFvGiMenX=AEsmEFw4+X-W2E5rgWGrK8Fgi-xgFT4SNFjZK4Q@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.504.1442185028.8327.python-list@python.org> (permalink) |
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
Auto indents (was Re: How to set the history commands visible ?) Terry Reedy <tjreedy@udel.edu> - 2015-09-13 18:56 -0400
csiph-web