Skip to content

Comment Out Multiple Lines of IronPython

I’m familiar with commenting out code using the hashtag symbol “#”, which is used here. The hashtag works well enough for commenting out single lines of code, but for multiple lines of code, it’s tedious. So, how do you comment out multiple lines of IronPython?

Comment Out Multiple Lines of IronPython

I learned recently you can use four single quotes (at the start) and three single quotes (at the end) to comment out multiple lines of code. I’m sure this falls into the bucket of “things all developers know”, but I am still learning IronPython. It was new to me and is clearly useful.

It won’t turn green in the same way the hashtag does, but it does comment out multiple lines of IronPython. Lastly, Jolene Robertson commented on this post on LinkedIn and noted that the indentation levels of the quotes must match the code being commented out. So, don’t forget that part!

Spotfire Version

Content created with Spotfire 7.12.

If You Enjoyed This, Check Out Other Posts

7 thoughts on “Comment Out Multiple Lines of IronPython”

  1. Pingback: Pro Tip No 5 Document Calculated Columns with Numbering » The Analytics Corner

  2. Pingback: How To Make Type Curve Inputs More Efficient » The Analytics Corner

  3. Pingback: Data Limiting In Spotfire » The Analytics Corner

  4. Pingback: Exporting to Excel with IronPython » The Analytics Corner

  5. Pingback: Set Multiple Scale Ranges with Document Properties » The Analytics Corner

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.