Python Coding/Documenting Style Question
Kevin Altis
altis at semi-retired.com
Sun Jan 12 02:47:37 EST 2003
See PEP 8 for recommendations on comments...
http://www.python.org/peps/pep-0008.html
ka
"Lothar Scholz" <llothar at web.de> wrote in message
news:6ee58e07.0301111827.4072409a at posting.google.com...
> 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