filmov
tv
Doc Strings in Functions || Functions in python || Part - 3 #python3 #python #programming

Показать описание
In this video, I have discussed about functional doc-strings
Why do we need to give doc-strings in functions?
We should give doc-string in function so, to briefly explain the purpose of the function, working, and basic documentation.
A simple example of a function with docstring:
def greet(user_name):
""" Hello I am a function
I am here to greet you
You can give argument as your name """
print("Hello")
print("How are you ", user_name, " ?")
greet("Ddhruv") #calling the function
# calling the function wont print thr doc-string
To pint the doc string we need to do the following:
print( function_name.__doc__)
# In python double-underscore is also know as dunder.
Try to add all the things that we have done till, date in a single function
Thank you for watching and reading.
Happy Coding ahead 👨🎓🌟✨
#python #pythonprogramming #coding #learning #teaching #youtuber #pythonfrombasics.
Why do we need to give doc-strings in functions?
We should give doc-string in function so, to briefly explain the purpose of the function, working, and basic documentation.
A simple example of a function with docstring:
def greet(user_name):
""" Hello I am a function
I am here to greet you
You can give argument as your name """
print("Hello")
print("How are you ", user_name, " ?")
greet("Ddhruv") #calling the function
# calling the function wont print thr doc-string
To pint the doc string we need to do the following:
print( function_name.__doc__)
# In python double-underscore is also know as dunder.
Try to add all the things that we have done till, date in a single function
Thank you for watching and reading.
Happy Coding ahead 👨🎓🌟✨
#python #pythonprogramming #coding #learning #teaching #youtuber #pythonfrombasics.
#6: Python Docstrings | Python Best Practices
[Language skills Python] Docstrings [Tutorial]
Creating Python Function docstrings and Running doctests
Docstrings - Python Tips and Tricks #10
Python Tutorial #17: Documentation Strings or DocStrings
Docstrings in Python
Python Tutorial: Docstrings
Documenting a Function in Python: DOCSTRING in Python - Python Tutorial for Beginners
Docstrings in Python | Python Tutorial - Day #29
Mastering Python - User Defined Functions - 03 Doc Strings
3.6. Documentation Strings||Doc Strings||Functions||Python Basics
#46-PYTHON TUTORIAL | DOCUMENTATION STRINGS ( OR DOCSTRINGS ) IN PYTHON
How to Document Your Code Like a Pro
Docstrings in Python #Shorts
What is Docstring in Python?
OOP Doc Strings
Docstring in Python | How to use docstrings in Python | Python Tutorial Part #49
Python (eng) - Function description / docstring
Docstrings for documentation about functions, methods , class and modules in Python using formats
Python Functions - doc string | Just enough Python
Intro to Python - Docstrings
Docstrings in Python
Python comments vs. docstrings: What, how, and why
Functions |Docstring | Python Tutorial #05
Комментарии