Open
Description
When you make a cell in a python file you use the characters:
# %%
# This code does ...
My Code
Above this code, there apears an option to run this cell. When it runs in the python interactive environment in a new panel, you see
# This code does ...
Result
So far so good. However, when you hit the button for code folding in the python file, the cell becomes:
# %%
This is unhelpful, as you have to unfold it to know what was hidden, and it has a different behavior from the interactive environment.
As a temporary solution I do
# %% This code does ...
# This code does ...
My Code
This way the code folding and the interactive window have the same text.
It would be nice not to have to do this redundant commenting.
Either the jupyter interactive side could be updated to show the text after the %%
or the code folding could happen at the line #
rather than #%%