ion-python icon indicating copy to clipboard operation
ion-python copied to clipboard

__repr__ for s-exp is misleading

Open rmarrowstone opened this issue 1 year ago • 1 comments

The repr for s-expressions is indistinguishable from that of lists:

>>> simpleion.loads('()')
[]

rmarrowstone avatar Apr 04 '23 16:04 rmarrowstone

An observation is that the in-memory type of an s-expression is a list. A python tuple may map to a list or a s-exp depending on a flag to the serialization.

rmarrowstone avatar Apr 04 '23 17:04 rmarrowstone