Notepad++ indentation messes up

前端 未结 6 687
灰色年华
灰色年华 2020-11-30 01:55

I\'m coding in Python and I really like Notepad++. However, off late when I use tab to indent, it seems fine in Notepad++, but when I run the program I get an indentation er

6条回答
  •  感情败类
    2020-11-30 02:09

    PEP 8 tells us to use spaces instead of tabs in Python for cross-editor compatibility and consistency:

    http://www.python.org/dev/peps/pep-0008/

    Have a look at this answer for how to change tabs to spaces in Notepad++

    Convert tabs to spaces in Notepad++

    Perhaps that will fix your problem

提交回复
热议问题