Export to GitHub

shedskin - issue #201

Invalid comment interpretation


Posted on Mar 15, 2014 by Swift Lion

What steps will reproduce the problem? Using shedskin 0.9.4 compile the following code

for it in (0, 1): #{ for o in ('i','g'): #{ print o #}

}

What is the expected output? What do you see instead? The python is valid and execute the following way: i g i g

However schedskin complains this way: ERROR /tmp/test.py:5: expected an indented block

Note that removing the #{ and #} fixes the problem. My editor is more convenient using this patterns (and should be harmless as it's only comments)

Hope it helps improve this great product. Cheers, Olivier

Comment #1

Posted on Mar 15, 2014 by Happy Camel

thanks a lot for reporting! will investigate within a few days..

Comment #2

Posted on Mar 15, 2014 by Swift Lion

No problem, I'm glad to contribute as I'm using it intensively :) Olivier

Comment #3

Posted on Mar 16, 2014 by Happy Camel

oh, please note that #{ and #} are also used as directives to shedskin that the surrounded code should not be compiled.. but apparently that breaks when they are nested. perhaps this directive was not such a good idea.

Comment #4

Posted on Mar 16, 2014 by Swift Lion

Uh, my bad, seems like I missed a feature of shedskin. But isn't the """ block commenting not sufficient for shedskin usecases ? I hadn't had a look at it already. Cheers, Olivier

Status: New

Labels:
Type-Defect Priority-Medium