Hi Ya'akov,I use two-space tabs as well so the code doesn’t slide too far off the screen.
It really does require analyzing the cost-benefit tradeoff. I am not a super-fan of Python but I have to give it what it is due. It has been so widely adopted in the science/math/experimental community that knowing and using it is an instant leg up if you are doing anything related. There are excellent libraries for Python in specialist areas, including one the best big number libraries.
I don’t know what you program in now, but if you are not using a dynamic language that will take a bit of getting used to. Again, it has advantages and disadvantages. Some people insist on calling Python* programs “scripts” because they believe they aren’t “real” programs.
* and Perl, and Javascript, &c
This is just word games without content. Because of the confusion concerning the difference between what is a script and what is a program, some time ago I spent quite a bit of effort researching the question and discovered there was no real difference in the context of dynamic vs. fully* compiled programming languages. It just isn’t a thing, and even if it was, it wouldn’t confer some special goodness on the “programs” compared with the “scripts”.
*fully compiled because dynamic languages generally use a combination of intermediate compilation and interpretation of the intermediate code
In practice, I finally decided to make the word “script” somewhat useful by making the following distinction:
For me, this makes using the two different words helpful in distinguish the role of a program, and to some extent the nature of the code in it.
In any case, if dynamic languages are new, you are going to find some very useful things they can do. Make sure to take advantage of them. I tell aspiring Perl programmers who are coming from a C/C++ background, and are writing Perl as if it was C, that C is a great language for writing Perl, but a terrible way to write perl code.*
*Perl is written in C (and Perl), but using C syntax and methods in Perl code completely misses the point of Perl
If you are going to learn Python, learn it all the way. Learn to program in it as Python programmers do. Try not to smuggle in a bunch of baggage. After you‘ve learned it fairly well, you may find a place for habits, structures, and methods you have learned for other languages—but wait until you know how to program “natively”.
Good luck, and have fun.
Thanks for the reply.
I think I understand what you are saying here. It would be better to learn the pro's before making any real code and any real judgements.
This is kind of interesting for me because this would be the first new language I have studied in quite a few years now. The previous was Java for Android, but I could not seem to find enough info on that for some reason. If I could find more about that I might put that first.
Do you happen to know if Python could be used for Android programming? I know this is a long shot, but if true that would be a really good "pro".