#35 strange tab key behavior for newer python constructs

closed-invalid
nobody
None
5
2005-08-02
2005-08-02
Mike Coleman
No

If you paste this into a python-mode buffer and then
put the cursor on the second line and hit tab
repeatedly, you'll get strange (non-idempotent) behavior.

print >> log, '\t'.join([ form[x].value
for x in ('name',
'institution', 'email') ])

Discussion

  • Skip Montanaro
    Skip Montanaro
    2005-08-02

    • status: open --> closed-invalid
     
  • Skip Montanaro
    Skip Montanaro
    2005-08-02

    Logged In: YES
    user_id=44345

    That is by design. It's supposed to cycle back through the
    tab stops
    until you reach column 1, after which the next TAB press
    reindents
    the line. This allows you to adjust the indentation of
    nested lines a bit
    easier.

    If this is a problem and you can suggest better behavior,
    feel free to
    reopen the ticket.