pyjaco
pyjaco copied to clipboard
Pyjaco version on pyjaco.org is outdated (was: Compiler doesn't construct a dict in the right manner)
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'}
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.
I used the tanslator on the website
Thank you for that info. I updated the description accordingly :)