[Python-ideas] Multi-line comment blocks.

Robert Kern robert.kern at gmail.com
Fri Jun 15 16:04:30 CEST 2012


On 6/15/12 11:49 AM, Sven Marnach wrote:
> Robert Kern schrieb am Fri, 15. Jun 2012, um 10:50:40 +0100:
>> Multi-line string literals aren't comments. They are multi-line
>> string literals. Unlike a comment, which does not show up in the
>> compiled bytecode, the Python interpreter actually does something
>> with those string literals. Sometimes people abuse them as ways to
>> poorly emulate block comments, but this is an abuse, not a feature
>> of the language.
>
> Multi-line string literals do not generate code in CPython, and their
> use as comments has BDFL approval:
>
>      https://twitter.com/gvanrossum/status/112670605505077248

Well fancy that.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-ideas mailing list