I searched within this thread but found no occurrence of keyword “defer”. I am not sure if I understood OP’s problem correctly, but the defer object idea I’ve been working on might solve this problem from a completely different angle:
Python 3.14.0a1+ (heads/feat/defer-expr:39136869fb, Dec 11 2024, 20:36:44) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from random import random
>>> X = defer.Mutable(random)
>>> 3*abs(X)**2 + 1
1.950801234788364
>>> 3*abs(X)**2 + 1
1.5514411634812437
>>> 3*abs(X)**2 + 1
1.2161244611889943