On Sat, 7 Jan 2017 at 03:23 Glyph Lefkowitz <gl...@twistedmatrix.com> wrote:

>
> Even if we do this though - is there any way to convince json.dumps to
> behave consistently between 2/3 for the purposes of examples?
>

As far as I know, the only way to handle this is with an if PY3 or if
isinstance(…). I don't know of a way to make json.dumps on Python 2
consistently return unicode, and I don't know of a way to make json.dumps
on Python 3 return bytes.
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to