New to Python - block grouping (spaces)
rustompmody at gmail.com
Tue Apr 21 04:18:39 CEST 2015
On Monday, April 20, 2015 at 9:14:23 AM UTC+5:30, Chris Angelico wrote:
> I definitely don't see how a non-text source code format would improve
> on it. Feel like elaborating?
You are putting emphasis on the 'non'. This puts you into an oscillatory system
between tautology and contradiction:
How can something which is NOT be something? -- contradiction
It is something else -- tautology
If you dont put the emphasis on the not but on 'structured text' it may be more
meaningful; eg html
html is not 'not-text' -- you can edit it in a text editor alright.
However if you edit it in a html-editor -- mozilla composer, seamonkey, or any
of zillion web versions -- you get (at least) two views -- text vs structured
In the text (ironically also called html) view it behaves like a half-assed
In the structured view it renders the html structure (somewhat)
So a table does not show as <table></table> <tr><td> etc but actually as cells.
This prevents trivial counting/off-by-one errors.
After the gross-layout is taken care of you can switch to text mode and add fancy html attributes if needed.
Likewise having ready access to the AST of a program would be neat
So for example when I used to do a lot of lisp, my editor was set up so that
- cursor arrows behaved like normal cursor arrows
- keypad arrows moved up/down/along S-exp ie they were tree movements
More information about the Python-list