New to Python - block grouping (spaces)

Marko Rauhamaa marko at pacujo.net
Sat Apr 18 03:42:07 EDT 2015


Rustom Mody <rustompmody at gmail.com>:

>> It would be possible to define a canonical AST storage format. Then,
>> your editor could "incarnate" the AST in the syntax of your choosing.
>> 
>> [...]
>
> Things like comments are a headache -- they have to be shoved into the
> AST rather artificially

I don't think comments would be so bad assuming you don't write comments
like this:

     result = principal * (1 + interest_rate / 100)
     # expressed as percentage ^^^^^^^^^^^^^

I know, I know -- that's a lot to assume.


Marko



More information about the Python-list mailing list