Welcome to Dream.In.Code
Become an Expert!

Join 150,194 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,057 people online right now. Registration is fast and FREE... Join Now!




about docstring

 
Reply to this topicStart new topic

about docstring

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

New D.I.C Head
*

Joined: 16 Sep, 2008
Posts: 14



Thanked: 2 times
My Contributions
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
+Quote Post

itpro4470
RE: About Docstring
25 Sep, 2008 - 10:51 AM
Post #2

D.I.C Head
Group Icon

Joined: 17 Jun, 2007
Posts: 123



Thanked: 1 times
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
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:28AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month