In python we can use help(myfunction) or my_function._doc_ to call the docstring associated with a function as console output. In pycharm we can place the caret inside the name of any function and press ctrl + Q in order to obtain a more well formated pop-up window containing the docstring. The docstring in python can be written for any function and also makes sense outside of package writing. In pycharm we can insert a docstring template in any definition of a function by placing the caret in the function name of the definition and hit alt + enter to get to a menu in which one option is to insert a docstring template based on the parameters of the function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |