Posts: 4,665
Threads: 1,502
Joined: Sep 2016
can i call a method on a docstring?
def myfunction(foo,bar):
"""this is
my docstring for
my function.""".replace('\n',' ')
return foo+barwill it recognize that as the docstring?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,665
Threads: 1,502
Joined: Sep 2016
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,665
Threads: 1,502
Joined: Sep 2016
to modify the content the way that method does.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,665
Threads: 1,502
Joined: Sep 2016
are you going to keep asking
why until you hear my life story?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,665
Threads: 1,502
Joined: Sep 2016
i have a docstring. it's not exactly what i want. appending a certain method call to a string like that makes a string that into what i want.
it is my understanding that the first unassigned value in a unit of code (such as a script file, a function, or a class, assigns that str to the
__doc__ string for that unit of code. however, when i tried it,
__doc__ was
None.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.