I know python does not formally support any built in regional code folding syntax. I do know that a few syntaxes exist out in the wild with conventions tied to specific editors and particular comment pairs.
I know of the python source code folding syntax recognized by VS Code which uses the #region
keyword
#region MY_CODE_REGION
...
#endregion
I came across another I don't recognize taken from some source over at
https://github.com/gitpython-developers/GitPython/blob/master/git/objects/tree.py#L96-L104
which used the following syntax
#{ MY_CODE_REGION
#} END MY_CODE_REGION
What other editor syntaxes exist for python? Is there a pending PEP open on the subject?