

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What does built-in class attribute __doc__ do in Python?
All functions have a built-in attribute __doc__, which returns the doc string defined in the function source code.
def foo(): """ This is an example of how a doc_string looks like. This string gives useful information about the function being defined. """ pass print foo.__doc__
Let's see how this would look like when we print it
This is an example of how a doc_string looks like. This string gives useful information about the function being defined.
- Related Questions & Answers
- What does built-in class attribute __dict__ do in Python?
- What does built-in class attribute __name__ do in Python?
- What does built-in class attribute __module__ do in Python?
- What does built-in class attribute __bases__ do in Python?
- What does the pandas.series.array attribute do?
- What does the pandas.series.index attribute do?
- What does the pandas.series.values attribute do?
- What are built-in class attributes in Python?
- What does the pandas DataFrame.columns attribute do?
- What does the pandas DataFrame.index attribute do?
- Built-In Class Attributes in Python
- What does language attribute do in <script> tag in Javascript?
- What does % do to strings in Python?
- What does raw_input() function do in python?
- What does input() function do in python?
Advertisements