On Thu, Apr 18, 2013 at 11:39 AM, Roland Koebler <r.koeb...@yahoo.de> wrote:
> as a quickhack, you
> could even monkey patch json.encoder.floatstr with a wrapper which
> returns "N/A" for NaN. (I've tested it: It works.)

Wait... you can do that? It's internal to iterencode, at least in
Python 3.3 and 2.7 that I'm looking at here. Can you share your code
please? I'd like to try that! When I first looked at the docstring, I
was thinking "Ah, can I override the bit that emits NaN to return
\"N/A\" instead?", but the code made me think that's not possible.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to