1. Preparatory work
(1) The Pycharm version is 2.7 or higher.
(2) A project has been created.
(3) Creating Python files (alt+insert→pythonfile)
2. Generate Source code
First, we instantiate a class, and pycharm immediately displays a red light bulb to give a quick completion suggestion:
Here we want to create a class that selects the corresponding prompt command, and Pycharm automatically creates a class based on its name:
Next we call the member function of this class (in general, once you enter a point number after the class name, the Pycharm's code completion mechanism lists the currently available function names, but here the member functions we use are not yet created in the class):
In the same situation, choose to create the method, and then observe how pycharm generates member functions:
Next we are going to add a member variable "color" to the class, and Pycharm will prompt us to create a member variable:
Ok,pycharm Intelligent completion of the creation of the variable added--Creates a constructor function:
Finally, you can also create a global function with Pycharm intelligence:
Full Pycharm Tutorial (--pycharm) Code Auto-generation of the editor function