[Python-ideas] Indentation, again: Problems with moving and combining code across editors.

Milind Khadilkar zedobject at gmail.com
Fri Aug 29 21:12:56 CEST 2014


Hi!
I do appreciate that indentation in Python code shows intention, and I am
all for it, but problems do arise if code is copied from one place to
another, even from specialized Python editors.... and there is little you
can do to recover intentions/indentations lost in the process.
Besides, spaces become difficult to count and distinguish from tabs, adding
to the problem. (Why allow tabs at all?)

Why can't Python be made to accept the following indentation of code (in
*addition* to the current schemes)? There could be some flexibility of
choosing the indentation character. (Pipe was mentioned as an alternative
in another thread)

for i in range(10):
.if i>5:
..print 10-i
.else:
..print i
print "!"

If not in the interpreter for some reason, could it be "advised" as a mode
in a python oriented editor, or a "dictated" mechanism for
copy/paste/transfer of code?

Sorry for posing an elementary question.

Thanks and regards
MK-zedobject
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140830/a0ab4239/attachment.html>


More information about the Python-ideas mailing list