Closed ricopicone closed 6 months ago
I suppose the only reason not to do this is if people are writing Markdown cell contents that are uncommented. I see no reason why they would because it could not be run as Python code, which seems to defeat the purpose of writing it in a Python script to begin with. But perhaps I'm missing something?
Hi @ricopicone , thank you for reaching out! I see your point.
Still, my expectations for the percent format is that it should be very explicit about the cell delimitations, so I would rather not change the current behavior.
There is another notebook format: py:light
that is more implicit about the cell delimitations, would you like to give it a try?
Thanks @mwouts. No worries. Thanks again for your work on this great project.
When reading a Python script in percent format, I see no reason not to automatically detect a new code cell, without an explicit code demarcation. Consider the following example:
This would be also be nicer in IDEs that support the percent format because there would be no need for the "extra" Markdown cells that are artifacts of the explicit Markdown cells:
Is there a reason not to do this? If this would be acceptable, I can try to make a PR.