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!
Content created with Spotfire 7.12.
Wow never knew that…it’s useful
Was tedious putting those #s and maintain the indentation!!!
Yep, that’s exactly how I felt about it.
Pingback: Pro Tip No 5 Document Calculated Columns with Numbering » The Analytics Corner
Pingback: How To Make Type Curve Inputs More Efficient » The Analytics Corner
Pingback: Data Limiting In Spotfire » The Analytics Corner
Pingback: Exporting to Excel with IronPython » The Analytics Corner
Pingback: Set Multiple Scale Ranges with Document Properties » The Analytics Corner