Python Coding/Documenting Style Question

Lothar Scholz llothar at web.de
Sat Jan 11 21:27:35 EST 2003


Is there any common coding style for commenting variables
like the following:

====================================

globalVar = 666  # here comes a comment from hell

class foo:
	"This is the class comment"
		
	ClassVar = 10  # comment about this
	
	def __init__(self):
		self.objectVar = "foo"   # description of objectVar
		
		
=====================================		
		
It seems quite common to add the comments on the same line but.
But what should i do when i want to use longer comments and/or 
document the type of a variable. 

Is there any tool that can
automatically generate documentation from such annotations ?




More information about the Python-list mailing list