summaryrefslogtreecommitdiff
path: root/simplejson/encoder.py
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2014-05-21 00:02:27 -0700
committerBob Ippolito <bob@redivi.com>2014-05-21 00:02:27 -0700
commit8741b67c403773706d2374161f1b87da2e1aa59b (patch)
treea3d31b23be225075ccc7d20c7c30f13a63d1e233 /simplejson/encoder.py
parentc43b3c5b8066f8f3c42de6e3ac4840a251d55c78 (diff)
downloadsimplejson-8741b67c403773706d2374161f1b87da2e1aa59b.tar.gz
clean up #96 and prep for v3.5.0 release
Diffstat (limited to 'simplejson/encoder.py')
-rw-r--r--simplejson/encoder.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/simplejson/encoder.py b/simplejson/encoder.py
index 6b2f76d..531015a 100644
--- a/simplejson/encoder.py
+++ b/simplejson/encoder.py
@@ -183,7 +183,8 @@ class JSONEncoder(object):
rounding that happens in Javascript otherwise.
If int_as_string_bitcount is a positive number (n), then int of size
- greater than 2**n or lower than -2**n will be encoded as strings.
+ greater than or equal to 2**n or lower than or equal to -2**n will be
+ encoded as strings.
If specified, item_sort_key is a callable used to sort the items in
each dictionary. This is useful if you want to sort items other than
@@ -323,10 +324,7 @@ class JSONEncoder(object):
key_memo = {}
int_as_string_bitcount = (
- (self.bigint_as_string and 53)
- or
- self.int_as_string_bitcount
- )
+ 53 if self.bigint_as_string else self.int_as_string_bitcount)
if (_one_shot and c_make_encoder is not None
and self.indent is None):
_iterencode = c_make_encoder(