i use windows and new in python. i have tried to docstring and an error occured showing that'' function object has no attribute _doc_ ''. What i need to do?
i have tried the code
def printMax(x,y):
'''Prints the maximum of two numbers.
Numbers must be intiger.'''
x=int(x)
y=int(y)
if x>y:
print x,'is max'
else:
print y,'is max'
print (printMax._doc_)
about docstring
Page 1 of 11 Replies - 1688 Views - Last Post: 25 September 2008 - 11:51 AM
Replies To: about docstring
#2
Re: about docstring
Posted 25 September 2008 - 11:51 AM
the only thing I can see is doc must have two _'s before and after it not just one so it's __doc__ you look like you have _doc_
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|