diff options
author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-30 20:39:26 +0900 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-30 20:39:26 +0900 |
commit | f31d9113ffc1c58bfcc47f2a29439102b62801fc (patch) | |
tree | 29914fdf4125adde8dd480ffd4e233e7a8e7eeb3 /sphinx/util/jsdump.py | |
parent | 9dbb6bf0927b4b04cc95b0ec27ece2325c5c6053 (diff) | |
download | sphinx-git-f31d9113ffc1c58bfcc47f2a29439102b62801fc.tar.gz |
use six privided functions/classes to support py2/py3 in one source. refs #1350
Diffstat (limited to 'sphinx/util/jsdump.py')
-rw-r--r-- | sphinx/util/jsdump.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py index 41ef96c01..e75f9f848 100644 --- a/sphinx/util/jsdump.py +++ b/sphinx/util/jsdump.py @@ -13,7 +13,7 @@ import re import six -from six import iteritems +from six import iteritems, integer_types from sphinx.util.pycompat import u @@ -87,7 +87,7 @@ def dumps(obj, key=False): return 'null' elif obj is True or obj is False: return obj and 'true' or 'false' - elif isinstance(obj, (int, long, float)): + elif isinstance(obj, integer_types + (float,)): return str(obj) elif isinstance(obj, dict): return '{%s}' % ','.join('%s:%s' % ( |