docStrings报错

时间:2022-05-06
本文章向大家介绍docStrings报错,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
   def printMax1(x,y):  
       '''Prints the maximum of two numbers.  
       The two values must be integers.'''  
       x=int(x)  
       y=int(y)  
       if x > y:  
           print(x, " is the maximum")  
       elif x < y:  
           print(y, "is the maximum")  
   printMax1(9,5)  
   print(printMax1.__doc__)//注意这里的doc旁边分别有两个下划线,否则出错