clvm icon indicating copy to clipboard operation
clvm copied to clipboard

`SExp` is mutable. So `SExp.true`, `SExp.false`, `SExp.__null__` are not safe to assume it's constant.

Open ChiaMineJP opened this issue 4 years ago • 0 comments

from clvm import SExp

print(SExp.true) # This prints '01'

s1 = SExp.to((1, SExp.true))
s1.pair[1].atom = b'\2'

print(SExp.true) # This prints '02'

Probably should protect property by getter/setter.

ChiaMineJP avatar Aug 21 '21 08:08 ChiaMineJP