Python Naming conventions

Source: Internet
Author: User
Tags uppercase letter
Canonical naming to avoid low-level problems
  • 1. The best name is English characters, underline _, the number of three components

  • 2. Project (Project) name, package name, module name, etc. should be in English beginning, not pure numbers , (the general has a special meaning at the beginning of the underscore, do not understand the use of chaos)

  • 3. The name of the script cannot be duplicated with the system's module or third-party module (e.g. Requests/unittest/selenium, etc.)

  • 4. The name of the function, class, method, parameter cannot be duplicated with the existing name of the system

  • 5. The class name must start with an uppercase letter , except for the class name, where all other places start with lowercase

Naming conventions are best followed by pre-hump and underline methods such as: Findelementbyid find_element_by_id

  • 6. Do not have Chinese, special characters (:; * & @, etc.), some special characters have special effect

Python Naming conventions

Related Article

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.