wish: multiline comments
Adrian Eyre
a.eyre at optichrome.com
Wed Dec 1 10:25:34 EST 1999
>> I would like to see multiline comments possible in some future
>> version of Python.
> Use multiline strings.
Not quite the same is it? A docstring will be put in the .pyc. A comment
won't.
Imagine (extreme example):
class A:
# Okay. This is a 42 million line comment about what my class does
# Yadda, yadda.
.
.
.
# The end
pass # :-)
class B:
"""Okay. This is a 42 million line docstring etc.
.
.
.
"""
pass
In one case, the .pyc generated is much bigger than the other. I not saying
that docstrings are bad, but they are NOT the same as comments, in that they
serve a purpose at runtime.
--------------------------------------------
Adrian Eyre <mailto:a.eyre at optichrome.com>
Optichrome Computer Solutions Ltd
Maybury Road, Woking, Surrey, GU21 5HX, UK
Tel: +44 1483 740 233 Fax: +44 1483 760 644
http://www.optichrome.com
--------------------------------------------
More information about the Python-list
mailing list