Python is the worst language *ever*

cephalo

Deity
Joined
Jul 26, 2007
Messages
2,058
Location
Missouri, USA
I've been using Python for many months now, and I just wanna say that I hate it, hate it, hate it.

Using indentation for loop control is nearly impossible in a multi-programmer environment. Just because you have right number of spaces, doesn't mean that the IDLE error checker will accept it. As you try to correct the problem with tabifying or untabifying, IDLE will gladly scramble most of your flow control in an entire file, and if you don't notice before a save, it's ruined.


Different programmers use different indentation schemes and I'm trying to use WinMerge to update my mod files, and the indentation problems mean that I'm having to go through line by line and verify each and every indentation. All this so we don't have to type brackets? I have to hand execute to determine the intent of code who's indentation has been deleted?

Ok, I just had to rant. :mad:
 
Does anyone know of a Python syntax checker that shows the different kind of whitespaces? You cant do that in IDLE and it's absolutely necessary. The Python files coming out of Firaxis are not consistent with their indentation.
 
I've downloaded pydev with eclipse a while ago, but never used it since i don't work on big project. But , knowing them , they should have such a tool.

Tcho !

Edit : if you find a language that manage windows process like PyWin32 do , i will perhaps reconsider python as a very good language ^^.
 
I've been using Python for many months now, and I just wanna say that I hate it, hate it, hate it.

Using indentation for loop control is nearly

Similar feelings here. Indentation for block control is just :aargh:
(Using Emacs since i am used to it... It has syntax highlight but does not really show you the whitespaces - at least not by default that is...).
 
When I first altered the python files I took a loooong time to set a consistent indentation thinking, "I'll only have to do this once... no big deal". Heheh, now I have to merge those back into the crappy Firaxis files that use tabs and spaces willy nilly.

I'm very glad that WinMerge at least can show the whitespaces.
 
I guess I'm in the minority, but I love Python. If you want to track whitespace in the file try using the Pythonwin editor. Over all it's a little better than Idle and it's also free. Here's a link if you're interested.

http://www.activestate.com/Products/activepython/feature_list.mhtml
(Click on Get ActivePython on the right side of the page)
 
I guess I'm in the minority, but I love Python. If you want to track whitespace in the file try using the Pythonwin editor. Over all it's a little better than Idle and it's also free. Here's a link if you're interested.

http://www.activestate.com/Products/activepython/feature_list.mhtml
(Click on Get ActivePython on the right side of the page)

Thanks! I'm going to give this a shot. Really, the only difference between using brackets and using whitespace for block control is that one of them is invisible.... If I can see it, I'm happy.
 
Have a look that the file CvInfoScreen.py that comes with the 317 patch in Pythonwin with whitespace visible. If it does indeed work as intended, it can only be because of a fortunate accident.

The fact that pythonwin can highlight indentation problems in real time makes it necessary if you want to use other peoples py files.
 
Have a look that the file CvInfoScreen.py that comes with the 317 patch in Pythonwin with whitespace visible. If it does indeed work as intended, it can only be because of a fortunate accident.

I know what you mean, some of the files that came with 3.13 had the same problem.
 
Having a good editor is a must for your sanity. I use PyDev for Eclipse, and it underlines invalid indentation in red (same for other syntax errors). Eclipse can be a little overwhelming at first, but for larger projects it is a must. It integrates with Subversion (version control on SourceForge), does merging, everything.

I was going to add a new feature to BUG the other day, but I realized that Eclipse had already written it for me. ;)

When I read about Python when it was created, my first thought was "whitespace as syntax is dumb", but now that I've used it a while, I can see why the designer went that way. You say that it's easy to see brackets vs. whitespace, but the real reason is so that you don't need a semicolon to end each statement.

Yes, that seems silly, but in programming courses, nine times out of ten a missing semicolon will block a beginning student for hours. I've tutored in those courses (C, C++, Java), and the compiler messages are obtuse at best.

For beginners, it's far easier to remember to hit "return" at the end of each statement without the need for a semicolon.

This doesn't even begin to cover all the other ways in which Python simply rocks.
 
Hi guys!, I'm glad to know that other people feel the same way I do... I do also hate Python
:vomit:, the only reason I learned it (sort of) is to mod civ.

Yes it may be harder for beginners to start programming with C/C++ or Java, but if they are really into this business then they will learn.

I consider python a "not serious" programming language, perhaps just above Visual Basic (and thank whatever god of your liking I have never touched VB :D). I love indentation, but this kind of indentation #/&%$#/ :mad:, and what about variables?! you don't even have to declare them, just put them and use them :wallbash:

Ahhh, I feel much better now.... :dance:
 
Hi guys!, I'm glad to know that other people feel the same way I do... I do also hate Python
:vomit:, the only reason I learned it (sort of) is to mod civ.

Yes it may be harder for beginners to start programming with C/C++ or Java, but if they are really into this business then they will learn.

I consider python a "not serious" programming language, perhaps just above Visual Basic (and thank whatever god of your liking I have never touched VB :D). I love indentation, but this kind of indentation #/&%$#/ :mad:, and what about variables?! you don't even have to declare them, just put them and use them :wallbash:

Ahhh, I feel much better now.... :dance:

Well I understand why some people don't like the formatting of python, there are reasonable differing views on this. But I'd like to just correct the idea that python is not a serious language. It is a most serious language used for some incredibly important code all over the world (scientific computing, financial computing, natural language processing). These are things nobody in those fields would ever consider using VB for. It is one of the more capable and elegant (not in formatting but language constructs) languages available, and its also very mature and well tested.

It is far and away many times more serious than VB. In fact I use python almost exclusively along with c++. They compliment each other very nicely.

As a side note, there is quiet a nice implementation of python that allows you to write assembly for the PS3. You'll never see VB doing anything like that :)

My 2 cents :)
 
You'll also find Python heavily used in most of the top internet companies. It allows for very fast prototyping and development.

I would also point out that VB is actually a serious language and has been used to write a lot of business applications. Being tied to Microsoft has hampered its use in servers, but it has its uses. It's just not nearly as sexy as some of the more modern languages.
 
I would also point out that VB is actually a serious language and has been used to write a lot of business applications. Being tied to Microsoft has hampered its use in servers, but it has its uses. It's just not nearly as sexy as some of the more modern languages.

Yes, unfortunately VB is widely used, even for serious and critical applications, it is just my opinion that VB is a little more than a joke (actually I know many people that think the same way), but that is just our point of view.

True, python is better than VB, but I still don't like it.

Cheers :beer:
 
With PyGame I had 2D sprites up and dancing in less then 30 minutes.
With Python-Ogre I had a 3D robot moving around with multiple view ports looking at different parts of the scene in less then an hour.
Text to Speech, nif models, just about anything you can name can be done in python and with less fuss and muss then you will find in other languages.

Python Rules.
 
With PyGame I had 2D sprites up and dancing in less then 30 minutes.
With Python-Ogre I had a 3D robot moving around with multiple view ports looking at different parts of the scene in less then an hour.

To be fair, that's more a result of having a good toolkit than the language.

For example, Ruby on Rails made it trivially easy to build simple web applications using Ruby. Everyone hailed Ruby as the killer language, better than all before her. Then came Java on Rails and Python on Rails and Rails.net, all making it just as easy. The languages hadn't changed -- only the tools.
 
Here's something else I can't get used to. The first half hour, forty-five minutes of every debugging session goes like this:

global name "getBananasFromTheGroceryStore" not defined

Ok... self.getBananasFromTheGroceryStore

global name "getFavoriteBreakfastCereal" not defined

Ok.... self.getFavoriteBreakfastCereal

global name... and on and on and on!

I am still utterly incapable of putting 'self.' in front of anything the first time through. It drives me CRAZY.
 
What I am loving right now is that you don't have to define what type of variable something is going to be, so I can make a string by just saying: Bob = "Bob"

But if I want to use it later, in the majority of cases, I have to remind Python that it is still a string: str(Bob)

That one is biting my goat a LOT today.
 
Back
Top Bottom