-
Notifications
You must be signed in to change notification settings - Fork 18
Failed to import some python std libs(e.g. json) in python code and then called in go code #3
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
Comments
I made a fix too, but forgot to push for review: https://github.com/alanjds/grumpy/tree/fix-jsondecode The CPython blame says that it is better to get from The real issue here, besides old CPython code, is about tuple unpacking on assignments. |
@alanjds I think that we should use CPython 2.7 code. WDYT? |
If we are importing any Python standard library related code in the future, |
stdlib.json.decoder: Hot fix for json decoder
I am not that sure. Usually, 3.X code are supersets of 2.7 ones, including all previous functionality.
Beside deprecations, I think it's better to use the newest code available, if compatible. Will inherit bugfixes, enhancements and got easier to bring support for Python 3. Why not providing the new features, if compatible? |
Btw, I merged your PR #5 |
For sure Python2 compatibility will come before Python3, but maybe one can be not "against" the other. @corona10 WDYT about targeting both pythons? |
Most of the compatible compiler use same code of origin stdlib. I don't think using a mixture code of Python2/3 is the proper way to develop a compatible compiler. |
We can use Python3 grammar when we meet an unavoidable situation, but it means that grumpy doesn't fully support the python2 feature. |
We can support Python 3 when we target python3, but now it looks not easy since they are still growing. One of the good points of grumpy is that we can promote this project who want to archive their Python2 code into Go code. (If they just maintain it and does not want to port into Python3) So, I suggest that we should focus on fully supporting Python2 which is not also the easy job. |
Ok. You may be right. I am clearly biased because people around me always (this week included) ask for Py3 support. And I am developing for Py3 only on my daily job already. Just feel sad to build Py2 compat instead of Py2 and Py3 at same time when possible. Seems a waste of time. But this can be an illusion of my biased sight anyway. |
Issue from google#408
Expected:
{'s': 3} 1
Got:
The text was updated successfully, but these errors were encountered: