[Matplotlib-devel] matplotlib limitations and design flaws

Ryan May rmay31 at gmail.com
Tue Feb 16 12:12:50 EST 2016


The plus side of `if 0:` is that when it ends up committed to your code
base (it shouldn't, but it happens), you can at least be sure that no
syntax errors creep in.

Ryan

On Tue, Feb 16, 2016 at 9:53 AM, Benjamin Root <ben.v.root at gmail.com> wrote:

> 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
>>
>>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
>
>


-- 
Ryan May
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20160216/d3adef15/attachment.html>


More information about the Matplotlib-devel mailing list