+ 3

Python docstring

Whats is exact meaning of docstring in python ?

23rd Jan 2018, 10:38 PM
NIMA
NIMA - avatar
4 Réponses
+ 9
A Python object's docsting is a triple-quoted string constant that appears as the first statement in an object's definition. It is intended to serve as a brief summary for your object, e.g. and is accessible to the help() in function. def f(x): """Returns foo of x""" # line above is this function's docstring result = foo (x) return result
23rd Jan 2018, 11:00 PM
Eric Blinkidu
Eric Blinkidu - avatar
+ 2
Hello Eric
28th Jan 2018, 5:09 AM
Eric Lecorps
Eric Lecorps - avatar
+ 1
Pls like my news
28th Jan 2018, 5:10 AM
Eric Lecorps
Eric Lecorps - avatar
28th Jan 2018, 5:10 AM
Eric Lecorps
Eric Lecorps - avatar