bendudson / py4cl

Call python from Common Lisp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A tuple as the value of a dict entry throws an error in py4cl

dfmorrison opened this issue · comments

Not sure if its worth reporting bugs here for things that do work in py4cl2, but in case it is... (guess I may have to bite the bullet and switch to py4cl2, despite the scary warnings in the README :-)

This works:

> (python-eval "(1, 2)")
(1 2)

And so does this:

> (python-eval "{\"key\": [1, 2]}")
#<HASH-TABLE :TEST EQUAL :COUNT 1 {1020FB9433}>

But this throws an error:

> (python-eval "{\"key\": (1, 2)}")
; in: LET ((TABLE (MAKE-HASH-TABLE :TEST 'EQUAL)))
;     (1 2)
; 
; caught ERROR:
;   illegal function call

This is in what QuickLisp calls py4cl-20220707-git in SBCL 2.3.7 on Ubuntu 22.04.3.

Thanks for reporting! I don't see fixing this in py4cl would break any existing code depending on good behavior. I have created a PR.

Wow, that was quick, thanks!