Is There A Way Around Coding In Python Without The Tab, Indent & Whitespace Criteria?
Solution 1:
The answer is no.
At least, not until something like the following is implemented:
from __future__ import braces
Solution 2:
Solution 3:
Emacs! Seriously, its use of "tab is a command, not a character", is absolutely perfect for python development.
Solution 4:
All of the whitespace issues I had when I was starting Python were the result mixing tabs and spaces. Once I configured everything to just use one or the other, I stopped having problems.
In my case I configured UltraEdit & vim to use spaces in place of tabs.
Solution 5:
I find it hard to understand when people flag this as a problem with Python. I took to it immediately and actually find it's one of my favourite 'features' of the language :)
In other languages I have two jobs: 1. Fix the braces so the computer can parse my code 2. Fix the indentation so I can parse my code.
So in Python I have half as much to worry about ;-)
(nb the only time I ever have problem with indendation is when Python code is in a blog and a forum that messes with the white-space but this is happening less and less as the apps get smarter)
Post a Comment for "Is There A Way Around Coding In Python Without The Tab, Indent & Whitespace Criteria?"