How to use code comments in an elegant python

When writing code, make sure your code easier to understand when it is very important to other people, to a variable, the function name from the right and rational organization of the code is a good way.

Increase code readability when using code comments Another convenient simple and important method!

1, code comments Why so important?

2. Write a comment in Python Best Practices

3, want to avoid the type of annotation

4, How to contact write more clarity comment

Why so important commented code

Note is an integral part of any program, a comment that they can appear in the form of blocks or lines of code, to help clarify a complex function.

Before delving into the different types of comments, let us take a closer look at why such an important code comments

Learn to use the elegant valuable comments, you not only learn how to write more clearly on, more concise, and you will no doubt have a better understanding of Python

You know how to make all developers can use Python comment (including your own) coding life easier! They can help other developers to quickly understand your code, and help you re-familiarize yourself with the code on it.

 

Guess you like

Origin www.cnblogs.com/jcjc/p/11410822.html