Python really makes me love and hate. Although today I still think Scala is better than it is, it is now slow to see Scala and Python is a leap in the distance. (even the Scala link to the 51CTO development page has been canceled ...) )
for Python is also a coincidence, before a set of Java packaging Selenium framework, one months ago suddenly received a training company phone call, asked me if I am interested in selenium, now has a free course. Adhering to the people's "traditional thinking", free always want to look at, and the teacher said the content is python.
At first I was conflicted, but I had to write Python in order to learn. Become basic or some, learning is still fast. And, of course, occasionally, don't forget to throw up the groove. Indentation distinguishes self in code blocks, Elif, and class method parameters.
Gradually also found its advantages-the script, that is, without the direct use of the seal class, which is very convenient for testing. Before thinking back, using Java to temporarily test an interface, first to put the previously written class to stick out and then write a main class call, Eclipse is also essential ... And now a urllib2 minutes, and even the IDE does not have to open. (although Java can also use the command line, but the degree of trouble is self-evident) in addition to the string segmentation, Python's [:-1] is simply like magic! Support Win32 message mechanism, can better implement the function I want. Basically the Python3 line solves the contents of the Java more than 10 row. At this point, Python gives me the feeling of being more, faster, better, save
Until the learning went deeper, the installation module began to make me hate it. Java installs a module, the jar package to copy to the project directory is good, and python most need to use PIP or Easy_tools, more wonderful is, some modules actually want to install VS2008(vs2010! It's so twisted! had a day to encounter this situation, really heart 10,000 tons of grass mud horse Pentium Ah! In addition to the chaos of Python, there are new classes and the old class, because after the 2.2 version, the class inherits the object base class as a new class, otherwise the old class, the difference is multiple inheritance (the article is described later), And in the 3.3 version of the same, all implicitly inherit the object base class, I just want to say, "Oh, what did you do?" "Python3.3 is basically a standalone version, with 2.X difference, 3.3 even print has to be bracketed, and the compatibility between the module is very poor!" That most of the current version is still 2. X
My path to Python is that it hurts and is happy, at least learning a little bit less bad, the only downside is that you always forget to define the variable type when you write Java code.
This article is from the "Listen to the Rain Xuan" blog, please be sure to keep this source http://heyijx2.blog.51cto.com/925730/1704624
Go on with my Python path