halgari/clojure-py — Issue #38: nth doesn't work with lists
Author: nathell
Created: 2012-03-08 15:59:53+00:00
State: open

user=> (nth (list 1 2 3) 1)
Traceback (most recent call last):
File "/home/nathell/.local/lib/python2.7/site-packages/clojure/main.py", line 134, in main
print comp.executeCode(res)
File "/home/nathell/.local/lib/python2.7/site-packages/clojure/lang/compiler.py", line 1118, in executeCode
retval = eval(c.to_code(), self.getNS().__dict__)
File "", line 0, in user/
File "/home/nathell/.local/lib/python2.7/site-packages/clojure/core.clj", line 2192, in clojure.core/nth_auto_
(py.bytecode/BINARY_SUBSCR coll x)
File "/home/nathell/.local/lib/python2.7/site-packages/clojure/lang/aseq.py", line 34, in __getitem__
s = s + 1
TypeError: unsupported operand type(s) for +: 'PersistentList' and 'int'