Skip to content

Commit 6380899

Browse files
committed
Drop the floatstr comment and trim the NEWS entry
Per review: the comment and the implementation detail in the NEWS entry are not relevant to end users.
1 parent 284d568 commit 6380899

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

Lib/json/encoder.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ def iterencode(self, o, _one_shot=False):
233233
self.key_separator, self.item_separator, self.sort_keys,
234234
self.skipkeys, self.allow_nan)
235235
else:
236-
# floatstr is only needed by the pure-Python encoder; defining it
237-
# lazily avoids building this closure on every encode that takes
238-
# the C fast path above.
239236
def floatstr(o, allow_nan=self.allow_nan,
240237
_repr=float.__repr__, _inf=INFINITY, _neginf=-INFINITY):
241238
# Check for specials. Note that this type of test is processor
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
Speed up :func:`json.dumps` for small documents by building the float
2-
formatting helper only on the slower Python encoding path instead of on every
3-
call. Patch by Bernát Gábor.
1+
Speed up :func:`json.dumps` for small documents. Patch by Bernát Gábor.

0 commit comments

Comments
 (0)