In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, I would like to share with you how pycharm automatically generates file comments and function comments related to knowledge, detailed content, clear logic, I believe that most people are too aware of this knowledge, so share this article for your reference, I hope you have something to learn after reading this article, let's take a look at it.
1. File comment
File-> settings-> Editor-> File and Code Templates-> Python Script
Pycharm provides a function of automatically generating header comments in new files, which can automatically generate necessary information such as running environment, author, date, etc., which is easy to use and easy to configure.
Follow the path option of 1-5. Fill in the desired notes in 5.
My template:
#-*-encoding: utf-8-*-"@ File: ${NAME} .py @ Contact: (C) Copyright 2018-2021 @ Modify Time @ Author @ Version @ Desciption- ${DATE} ${TIME } Emac.li 1.0 None "" 2. Function comment
Automatically generate function comments, including parameters and return values.
When using the method, enter three double quotes and enter directly when the function is defined, for example:
Def a (BBM C):
Start another line, enter three quotation marks, and then enter
Def a (BBM C): "
Results:
Def a (BBM C):
"
: param b:
: param c:
: return:
"
These are all the contents of the article "how to automatically generate file comments and function comments by pycharm". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.