why no block comments in Python?

Peter Otten __peter__ at web.de
Thu Mar 9 10:26:15 EST 2006


msoulier wrote:

>> (and if you don't, you can quickly comment out regions by putting them
>> inside a triple-quoted string.)
> 
> Although that will use up memory, as opposed to a comment.
 
Doesn't seem so:

>>> def f():
...     "docstring"
...     "another string"
...     a = 42
...     "yet another string"
...
>>> f.func_code.co_consts
('docstring', 42, None)
>>>

Peter



More information about the Python-list mailing list