Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator expressions not working #100

Open
JohnDenker opened this issue Sep 19, 2015 · 3 comments
Open

generator expressions not working #100

JohnDenker opened this issue Sep 19, 2015 · 3 comments
Labels

Comments

@JohnDenker
Copy link

Context

print(list([x, x**3] for x in range(6)))

Expected and Desired Behavior (regular python)

[[0, 0], [1, 1], [2, 8], [3, 27], [4, 64], [5, 125]]

Observed Behavior (RS)

ERROR: Unexpected token keyword «for», expected punc «,» [/home/jsd/physics/python-lambda.py:2,21]

/usrsrc/RapydScript/lib/parse.js:145
    throw new JS_Parse_Error(message, line, col, pos, is_eof);

Non-workaround

Lambda expressions don't seem to be working either; see item #99

@kovidgoyal
Copy link
Contributor

deleted -- wrong bug report

@kovidgoyal
Copy link
Contributor

@atsepkov
Copy link
Owner

atsepkov commented Sep 7, 2016

Won't be addressing this at this time, the difference is subtle enough from regular list comprehension and the change is invasive enough that I'll leave this alone until ES6 functionality becomes more prevalent in RS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants