New submission from Quentin Peter:

I want to output floats in ENG format. Working with distance in micrometers, it 
is a bit annoying to see:
2.5e-5
.0003
instead of 
25e-6
300e-6
The solution I found was to redefine `iterencode` but that doesn't feel right.

I would like to see something similar to the "default" function that is easely 
modified.

----------
messages: 302162
nosy: qpeter
priority: normal
severity: normal
status: open
title: No easy way to change float formatting when subclassing 
encoder.JSONEncoder
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31466>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to