Repository: unihd-cag/skillbridge (language: python)

Issue:
Abnormal parsing return value from global var
if return value is 
```
list(nil t nil)
```
python will get a dict object
``` python
{'t':None}
```


Discussion / hints:
Skill does this weird thing with lists that start with `nil` and contain symbol-value pairs. Looks like `t` is considered a symbol in Skill.

Fix patch:
diff --git a/skillbridge/server/python_server.il b/skillbridge/server/python_server.il
index 5a6214e..fde2d78 100644
--- a/skillbridge/server/python_server.il
+++ b/skillbridge/server/python_server.il
@@ -182,7 +182,7 @@ let((_filename _baseName _moduleFolder _logDirectory _executable _unbound)
         if(or(numberp(thing) stringp(thing)) then lsprintf("%L" thing) else
         if(symbolp(thing) then lsprintf("Symbol('%s')" thing) else
         if(listp(thing) then
-            if(and(!car(thing) symbolp(cadr(thing)))
+            if(and(!car(thing) symbolp(cadr(thing)) cadr(thing) != t)
             then __pyPropertyListToPython(thing)
             else __pyListToPython(thing)
             )


Test patch:
diff --git a/tests/test_integration.py b/tests/test_integration.py
index 6993b9f..bc4c44c 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -211,3 +211,7 @@ def test_table_getattr_is_equivalent_to_symbol_lookup(ws: Workspace) -> None:
 
     t.xyz_abc = 20
     assert t[Symbol('xyzAbc')] == 20
+
+
+def test_nil_t_nil_is_not_a_disembodied_property_list(ws: Workspace) -> None:
+    assert ws["cdr"]([0, None, True, None]) == [None, True, None]