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

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to