sanyaade-g2g-repos / skulpt

Automatically exported from code.google.com/p/skulpt
Other
0 stars 0 forks source link

Optional Value Assignment not working #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Code you're trying to run:
print [x for x in range(1,10) if False] or ["hello" for x in range(1,10) if 
True]

What does "real" Python output?
['hello', 'hello', 'hello', 'hello', 'hello', 'hello', 'hello', 'hello', 
'hello']

What browser are you using? On what operating system?
Firefox 3-6-12 on Mac OS X.6.

Please provide any additional information.

Original issue reported on code.google.com by carnioja...@gmail.com on 24 Nov 2010 at 2:29

GoogleCodeExporter commented 9 years ago
Thanks for the bug report, this is fixed in HEAD (but not yet pushed to the
web site).

Original comment by sgraham on 29 Nov 2010 at 4:24

GoogleCodeExporter commented 9 years ago

Original comment by sgraham on 29 Nov 2010 at 4:44

GoogleCodeExporter commented 9 years ago
Seems to return True... in the HEAD revision. I'm basing this off of 
skulpt/doc/index.html. Is that wrong?

Original comment by carnioja...@gmail.com on 29 Nov 2010 at 5:37

GoogleCodeExporter commented 9 years ago
You can test via HEAD in doc/index.html, but the docs need to built (and
aren't automatically). You can build via "./m dist" (though there may be
dependencies to sort out to get that to work). That builds the
compiled/minimized version of Skulpt and copies it to the dist dir.

During dev, I run unit tests from the command line just by "./m". The code
for the unit tests is in test/run/*.py

Original comment by sgraham on 29 Nov 2010 at 6:35

GoogleCodeExporter commented 9 years ago
fyi... d8 complains/fails (might be that I have a newer build of it than you 
do, or something) here:

-----
WANTED:
-----
NO_.SYMTAB_FILE
symtab: 256/259
Uncaught: "Error loading file", test/test.js line 209 column 18
    var expect = read(name + ".py.real");
                 ^

Is this some dependency problem?

Original comment by carnioja...@gmail.com on 29 Nov 2010 at 7:24

GoogleCodeExporter commented 9 years ago
Sorry, that's missing files.

The test data is generated by running real python on the tests via "./m
regentests". That runs python on all the tests in test/run/ and saves the
results. That normally gets checked in, but I forgot for those tests.
regentests needs to be run after adding new test cases.

Original comment by sgraham on 29 Nov 2010 at 7:54