Python 43rd day-third module assessment

Source: Internet
Author: User

Object-oriented:

Concept: Class, instantiation, object, instance

Property:

Public properties: Defined in class

Member properties: defined in method

Private properties: Restrict external access by using the __ property definition in a method

Method:

Common methods

Class method: @classmethod the name of the decorated class. Calling default Pass (CLS)

static method: @staticmethod decoration through the class name. Calls, which are not related to a class, are equivalent to a tool function in a class

Property method: @property decoration as a property call

Built-in Method: (Special method) __new__ trigger __init__ Create instance

__init__ Construction Method

The __call__ object is appended with parentheses to trigger execution

__DOC__ View description information for a class

__MODULE__ the currently manipulated object in that module

__class__ which class is created for the object currently being manipulated

__del__ destructor Method The current object is automatically executed when it is freed in memory

__dict__ viewing members in a class or object

__str__ If this method is defined in a class, the return value of the method is output by default when the object is printed

__GETITEM__ index Operations Get data

__setitem__ Setting Modification Data

__DELITEM__ Deleting data

__metaclass__ is used to define what form is created

  

Python 43rd day-third module assessment

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.