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.