[Python-ideas] Transportable indent level markers. /// ; ; ; \\\
Jeremy Sanders
jeremy at jeremysanders.net
Thu Dec 15 11:11:01 CET 2011
Ron Adam wrote:
>
> ;;; def acc(n): # indent +0
> /// s = n # indent +1
> ;;; def add(i): # indent +0
> /// nonlocal s # indent +1
> ;;; s += i # indent +0
> ;;; return s # indent +0
> \\\ return add # indent -1
>
To allow easy use of python in environments which aren't space-sensitive,
wouldn't another solution be to have some sort of non-space character which
could act as leading spaces, e.g.
def foo():
;;a = 0
;;for i in range(10):
;;;;a += i
;;return a
Of course this wouldn't work for enviroments which lose or cannot contain
line breaks, however.
Jeremy
More information about the Python-ideas
mailing list