-
Notifications
You must be signed in to change notification settings - Fork 28
Description
I'd like to implement Python 3 support for this package. It's one of the last packages that do not support it here: http://py3readiness.org/
I've been studying Python C extensions and this package's code, and I believe this is doable.
The hardest and most important part is to define how the two functions should work in Python 3. This is what I thought so far:
- JSON_encode: as of now, this function returns a Python 2 str object. Since this is the equivalent of the bytes type in Python 3, I thinks it would be better if this function returned a Python 3 str (equivalent to Python 2 unicode) by default, and we add an argument that makes it return a bytes object (the current behavior).
- JSON_decode: basically I think that the argument
all_unicodeshould have it's default value changed toTruein Python 3.
I'm still getting used to Python 3 myself, and I haven't ported much code from Python 2 to 3 yet, so I'm not sure if these are the best options, but I believe they are a good enough first step towards porting, and then we can find someone with more expertise to help decide what would be the best choices for Python 3.
Anyway, thanks a lot for this great package, and I hope you will consider my offer favorably! :)