Python (Python Preview) as a scripting language)

Source: Internet
Author: User

Testing requires the use of scripting language to write automated programs, and the selection of scripting language is often a very confusing problem for beginners. In fact, the competition for scripting language is quite a long history. For example, the post in the Douban Python Programming Group: Why did Douban choose the former option between Python and Ruby? Since the discussion in, it has a long history.

Of course, python is not used as a scripting language for Douban. In fact, six pieces of code for Douban development are written in Python, which seems to give more confidence to those who select python, at least Python applications are not as limited as they are generally considered. For the advantages of Python, you can find answers in specialized books, such as learning.
Python. Well, I have to admit that when I opened this book, I actually chose python. The advantage in this book only increases my confidence in choice. In fact, instead of spending a lot of time comparing the advantages and disadvantages of a language, it is better for a tester to make up his mind to learn at the same time, after all, any language that is "alive" has its vitality and has no prefix. The reason why I chose python is actually silly. One is that python appears frequently on the recruitment notice; the other is Douban; the third is ...... This year is the year of the Snake. Is that true?

Let's take a look.Learning PythonStatement:

1. Software Quality: readable, and hence reusable and maintainable. It is highly readable, so it has good reusability and maintainability. This is easy to understand, because Python depends on whitespace to differentiate code levels, which is beautiful and beautiful. In addition, python is an object-oriented scripting language.

2. Develop Productivity: Python code is generally only 1/3 to 1/5 of C ++ or Java code. As an interpreted language, Python saves compile and link time.

3. Program Portability: Most Python programs are cross-platform, so they are often used as shell tools and control language.

4. Support libraries: the python standard library contains many prebuilt & portable functions. In addition, python is highly scalable, including the homegrown library and many third-party application support software. For example, numpy is considered to be able to replace the MATLAB numeric programming system.

5. Component Integration: python is often used as product mizmization and extension tools.

6. Enjoyment: Because 1 and 2 ^_^

In general, speed is the biggest weakness of Python, but it is not really a problem. Some time-consuming tasks, such as file or Gui-related tasks, are actually run at C speed. Because these tasks directly dispatched to compiled C code inside the python interpreter.

In short, python is a popular open source system with object-oriented advantages (polymorphism, Operator overloading, and multiple inheritance). It is easy to learn and worth choosing.

Python Official Website: http://www.python.org

The writer: Guido van rosum

Recommended books: Learning Python; programming Python; Python pocket reference

Recommended learning site: http://www.codecademy.com/zh/tracks/python

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.