Skip to content

Commit

Permalink
add encoder for tuple, fix issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Apr 25, 2012
1 parent 44e41bb commit d28f833
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clj.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def get_type(self,t):
return ("number", False)
elif isinstance(t, dict):
return ("dict", True)
elif isinstance(t, list):
elif isinstance(t, (list,tuple)):
return ("list", True)
elif isinstance(t, set):
return ("set", True)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
long_desc=open('README.rst','r').read()

setup(name="pyclj",
version="0.1.8.2",
version="0.1.9",
author="Sun Ning",
author_email="sunng@about.me",
description="clojure literal reader and writer for python",
long_description=long_desc,
url="http://github.com/sunng87/pyclj",
license='mit',
py_modules=['clj'],
classifiers=['Development Status :: 3 - Alpha',
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Topic :: Software Development',
Expand Down
1 change: 1 addition & 0 deletions tests/clj-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def setUp(self):
'false': False,
'nil': None,
"[1 2 3]":[1,2,3],
"[1 2 3 4]": (1,2,3,4),
'{"a" 1 "b" 2}':{"a":1, "b":2},
'#{1}': set([1]),
'["h" nil [1 2 3] {"w" true}]':["h",None,[1,2,3],{"w":True}]
Expand Down

0 comments on commit d28f833

Please sign in to comment.