Skip to content
Browse files

fix bugs

  • Loading branch information...
1 parent 38d134c commit 3e3370b9aae0357a0b1d7a6780ef24929711e710 @sunng87 committed Feb 27, 2012
Showing with 6 additions and 4 deletions.
  1. +5 −3 clj.py
  2. +1 −1 setup.py
View
8 clj.py
@@ -104,7 +104,8 @@ def __read_fd(self, size):
self.cur_line = self.cur_line + 1
return c
else:
- return self.fd.read(size)
+ cs = self.fd.read(size)
+ return cs
def __read_token(self):
c = self.__read_fd(1)
@@ -204,7 +205,7 @@ def __read_token(self):
r = False
e = c
- if e is self.terminator:
+ if e == self.terminator:
current_scope, _, container = self.value_stack.pop()
if r:
@@ -218,8 +219,9 @@ def __read_token(self):
v = {}
for i in range(0, len(current_scope), 2):
v[current_scope[i]] = current_scope[i+1]
+ r = True
- if len(self.value_stack) > 0:
+ if r and len(self.value_stack) > 0:
self.value_stack[-1][0].append(v)
self.terminator = self.value_stack[-1][1]
View
2 setup.py
@@ -6,7 +6,7 @@
long_desc=open('README.rst','r').read()
setup(name="pyclj",
- version="0.1.6",
+ version="0.1.7",
author="Sun Ning",
author_email="sunng@about.me",
description="clojure literal reader and writer for python",

0 comments on commit 3e3370b

Please sign in to comment.
Something went wrong with that request. Please try again.