[New-bugs-announce] [issue42434] Library json, file json/encoder.py: Function floatstr should be a class-level function.

David Salač report at bugs.python.org
Sun Nov 22 06:15:21 EST 2020


New submission from David Salač <salacdav at gmail.com>:

The logic as it is implemented now does not allow to user to override floatstr function. That makes things enormously inconvenient for people who need any different of behaviour (for example return string values defining Infinity, NaN or -Infinity). If it was moved on the class-level, it would easier because it makes floatstr to be a class-level function.

----------
components: Library (Lib)
files: encoder.py
messages: 381609
nosy: salacdav
priority: normal
severity: normal
status: open
title: Library json, file json/encoder.py: Function floatstr should be a class-level function.
type: enhancement
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49613/encoder.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42434>
_______________________________________


More information about the New-bugs-announce mailing list