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

None portable dict comprehension for versions of python below 2.7 #403

Open
GoogleCodeExporter opened this issue Apr 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run gyp on a system with a version of python less than 2.7
2.
3.

What is the expected output? What do you see instead?
No error is expected.

Instead an exception is thrown:
  File "<mac_tool.py>", line 506

  {k : self.ExpandVariables(data[k], substitutions)) for k in data} 
                                                                                  ^
SyntaxError: invalid syntax

What version of the product are you using? On what operating system?
On MacOS Darwin-10.8.0-i386-64bit running python2.6

Please provide any additional information below.
A fix that would ensure portability across all versions of python:
   dict((k, self.ExpandVariables(data[k], substitutions)) for k in data) # Tested on versions of Python from 2.4 until 3.2

Original issue reported on code.google.com by emm.od...@gmail.com on 16 Jan 2014 at 1:52

@GoogleCodeExporter
Copy link
Author

Duplicate of Issue 402 (https://code.google.com/p/gyp/issues/detail?id=402)

Original comment by jo...@bergstroem.nu on 20 Jan 2014 at 3:23

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

No branches or pull requests

1 participant