python doesnt suck. just because you dont like it doesnt mean it sucks. i think ruby is horrible (for me). python is by far better than java, having done projects in both "langs". ive found that the people who dont like it treat it as c(++) but you have to recognize its its own language and then youll see that it is like c
Web langs suck IMO. Python is a completely different language than C. I hate Python. As I said before that's only my opinion. No need to argue about if my opinion is "right" or not. Same thing happens on Youtube.
Python is a pretty cool language, though the whitespace thing is definitely problematic. Especially in multiple developer environments (are they using tabs or spaces?)
At my last job, the tab/space confusion repeatedly led to errors for many developers.
Other than that, I think it's a pretty slick language.
Its simplicity is deceptive, though. I mean it's easy to write a hello world and to jot down basic structures (which is the whole point), but if you want to do something involved, you have to understand how it works on a lower level or it bites you in the balls. In the end setting up a full structured program skeleton in Python isn't much easier than doing it in C++ ... although writing the "meat" of the program does tend to go much faster.
Disch, python, if I remember correctly, defines it as "whitespace" and whitespace is defined as at least one or more, including mixtures, of spaces and tabs, in the same order.
In example, you can have:
white space can be of any length but must be the same throughout a block of code. It asks for consistency and in the manner it asks it in, it's easy for formatting tools to automate this so a group effort doesn't really need to feel pain from having different tastes.
3 years experience, and you are complaining about something as minor as indentation. The one goof I do that makes me laugh is, because my largest amount of experience is using C and C++, when I start using one of the languages that use import, I catch myself putting #include still. For example, in Python I meant to do from sys import * and did #include <sys> without thinking. That issue is just superficial though. Same with indenting. If you have a good IDE (like Geany, which is available on all OSes and free) you can select the language being used (in Geany it is Document->Set Filetype then categorized languages) or save the file with the proper type (.py) and the editor will do the indents for you.
Is what was happening. If you have tabs set to 4 spaces in your text editor, they will look identical unless you turn on the "show whitespace" option so you can actually see spaces/tabs.
Yes, text editors can auto format. But no, it's not fullproof (copy/pasting for example, often doesn't reformat the entire pasted block).
It didn't help that the job did not enforce any particular editor on the developers, so everyone was using their own preferred editor.
Code slipped into the codebase that was completely broken and not executing because Python silently ignored large chunks of code due to it being indented differently. It took several manhours to find/fix.
Say what you will.. but in my opinion that is a huge, gaping flaw in an otherwise fascinating language. IMO... if you're going to say whitespace matters, you should formalize how you want whitespace to be defined. IE: indentation must be tabs only, spaces will throw an error (or vice versa).
Of course it's too late to do that with the language now.
3 years experience, and you are complaining about something as minor as indentation.
I know you posted before me... but it's not minor when it silently destroys code and/or prevents it from running. It's a major problem that can cost a lot of time and money to solve.