[Matplotlib-devel] matplotlib limitations and design flaws

Benjamin Root ben.v.root at gmail.com
Tue Feb 16 11:53:27 EST 2016


All the more reason why I utilize triple quoting for "commenting out
blocks". It may not be syntax-colored for comments, but it is colored
obviously differently than code.

Another reason not to like /* ...  */ for commenting out blocks of code.
That is often used for multi-line comments anyway. So, if you have
multi-line comments in the code block that you need to comment out, then
just doing /* ... */ around that isn't trivial. At least with triple
quoting, I can alternate between triple double-quotes and triple
single-quotes.


On Tue, Feb 16, 2016 at 11:48 AM, Phillip Feldman <
phillip.m.feldman at gmail.com> wrote:

> The downside of "if 0:" is that no editor will syntax color this as a
> comment.
>
> On Tue, Feb 16, 2016 at 7:57 AM, Phillip Feldman <
> phillip.m.feldman at gmail.com> wrote:
>
>> OK.  "if 0:" is a reasonable solution.  I will remove the block comment
>> issue.
>>
>> On Tue, Feb 16, 2016 at 3:20 AM, Jouni K. Seppänen <jks at iki.fi> wrote:
>>
>>> Benjamin Root <ben.v.root at gmail.com> writes:
>>>
>>> > And if I need to temporarily "comment out" a chunk of code, triple
>>> quoting
>>> > works great.
>>>
>>> You can also insert an "if 0:" indented between your normal indentation
>>> levels, and end the block with "if 1:" unless you wanted to comment out
>>> to the end of the natural block.
>>>
>>> --
>>> Jouni K. Seppänen
>>> http://www.iki.fi/jks
>>>
>>> _______________________________________________
>>> Matplotlib-devel mailing list
>>> Matplotlib-devel at python.org
>>> https://mail.python.org/mailman/listinfo/matplotlib-devel
>>>
>>
>>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20160216/e4573ef0/attachment.html>


More information about the Matplotlib-devel mailing list