Author mark.dickinson
Recipients, eric.smith, ezio.melotti, mark.dickinson, pitrou, rhettinger
Date 2016-01-29.20:32:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Eric: I suspect he's talking about section of the 6th edition of ECMA-262; a PDF can be found here: Clause 6 applies to this particular example:

If k <= n <= 21, return the String consisting of the code units of the k digits of the decimal representation of s (in order, with no leading zeroes), followed by nk occurrences of the code unit 0x0030 (DIGIT ZERO).

here 'k' is the number of significant digits in the shortest possible representation (i.e., the number of significant digits that Python's repr will use), and n is the "adjusted exponent" of the input (so k = 16 and n = 21 in this case, because 10**20 <= target_value < 10**21).

I'm not convinced of the importance / value of making Python's json implementation exactly correspond to that of Google's JS engine, though. For one thing, there's no spec: ECMA-262 isn't good enough, since (as noted in the spec), the least significant digit isn't necessarily defined by their requirements, so it's still perfectly possible for two JS implementations to both conform with the specification and still give different output strings.
Date User Action Args
2016-01-29 20:32:11mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, pitrou, eric.smith, ezio.melotti,
2016-01-29 20:32:11mark.dickinsonsetmessageid: <>
2016-01-29 20:32:11mark.dickinsonlinkissue26229 messages
2016-01-29 20:32:10mark.dickinsoncreate