dmeranda / demjson

Python module for JSON data encoding, including jsonlint. See the project Wiki here on Github. Also read the README at the bottom of this page, or the project homepage at
http://deron.meranda.us/python/demjson/
Other
302 stars 76 forks source link

Code bug? #29

Closed dodoflyy closed 6 years ago

dodoflyy commented 6 years ago

hello, I installed and tried to import demjson, but a python Error raised:

Traceback (most recent call last): File "", line 1, in File "/ifs1/Reotech/user/pengguoyu/software/demjson-2.2.4/demjson.py", line 645 class json_int( (1L).class ): # Have to specify base this way to satisfy 2to3 -----------------^ SyntaxError: invalid syntax

I don't know why this syntax error. My python version is: Python 3.6.5

dmeranda commented 6 years ago

How did you install demjson? The original source file is meant to be run under Python 2.x. To use it under Python 3.x, it needs to be transformed using the 2to3 conversion program. This is normally done by the setup.py if you install it using a standard Python packager. If not you can easily run 2to3 yourself.

By the way I'm using demjson 2.2.4 under Python 3.6.5 just fine.

dmeranda commented 6 years ago

Assuming poster solved the problem, if not open a new issue