Is there a way around coding in Python without the tab, indent & whitespace criteria?

前端 未结 29 1126
小鲜肉
小鲜肉 2020-12-31 14:05

I want to start using Python for small projects but the fact that a misplaced tab or indent can throw a compile error is really getting on my nerves. Is there some type of s

29条回答
  •  忘掉有多难
    2020-12-31 14:55

    Tabs and spaces confusion can be fixed by setting your editor to use spaces instead of tabs.

    To make whitespace completely intuitive, you can use a stronger code editor or an IDE (though you don't need a full-blown IDE if all you need is proper automatic code indenting).

    A list of editors can be found in the Python wiki, though that one is a bit too exhausting: - http://wiki.python.org/moin/PythonEditors

    There's already a question in here which tries to slim that down a bit:

    • https://stackoverflow.com/questions/60784/poll-which-python-ideeditor-is-the-best

    Maybe you should add a more specific question on that: "Which Python editor or IDE do you prefer on Windows - and why?"

提交回复
热议问题