Chia-Network / clvm

[Contract Language|Chia Lisp] Virtual Machine
Apache License 2.0
86 stars 35 forks source link

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

Open ChiaMineJP opened 3 years ago

ChiaMineJP commented 3 years ago
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.