Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,685 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,247 people online right now. Registration is fast and FREE... Join Now!




about docstring

 
Reply to this topicStart new topic

about docstring

shadhin
post 16 Sep, 2008 - 05:55 PM
Post #1


New D.I.C Head

*
Joined: 16 Sep, 2008
Posts: 3

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


User is offlineProfile CardPM

Go to the top of the page

itpro4470
post 25 Sep, 2008 - 10:51 AM
Post #2


D.I.C Head

Group Icon
Joined: 17 Jun, 2007
Posts: 107



Dream Kudos: 25
My Contributions


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_
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 07:13AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month