1 Replies - 2083 Views - Last Post: 25 September 2008 - 11:51 AM Rate Topic: -----

#1 atik97  Icon User is offline

  • ???
  • member icon

Reputation: 144
  • View blog
  • Posts: 715
  • Joined: 16-September 08

about docstring

Posted 16 September 2008 - 06:55 PM

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_)

Is This A Good Question/Topic? 0
  • +

Replies To: about docstring

#2 itpro4470  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 156
  • Joined: 17-June 07

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_
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1