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

Pyjaco version on pyjaco.org is outdated (was: Compiler doesn't construct a dict in the right manner) #78

Open
obeleh opened this issue Nov 26, 2012 · 3 comments
Labels

Comments

@obeleh
Copy link

obeleh commented Nov 26, 2012

Example code:

def createDict(key, value):
return {key: value}

if str(createDict("k", "v")) != "{'k': 'v'}":
raise Exception("Dict wrong")

The result is:
{'key': 'v'}
And it should be:
{'k': 'v'}

@chrivers
Copy link
Owner

I can't replicate this with the master branch

I use a modified test case:

def createDict(key, value):
  return {key: value}

v = createDict("k", "v")
if str(v) != "{'k': 'v'}":
  raise Exception("Dict wrong")
else:
  print v

Both python and pyjaco produce this:

{'k': 'v'}

Can you check if you are using the newest release? If it's still a problem, can you please send the generated code? Let me know if you need any help with this.

@obeleh
Copy link
Author

obeleh commented Nov 26, 2012

I used the tanslator on the website

@chrivers
Copy link
Owner

Thank you for that info. I updated the description accordingly :)

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

2 participants