Greetings,
I am trying to return a function call from the function itself with the
context `hold`
The following example does not behave as i'd want:
```
def g(x):
with hold:
held = sqrt(x)
return held
g(4)
> 2
```
To get around this, i make the change SR(x):
```
def g(x):
with hold:
held = sqrt(SR(x))
return held
g(4)
> sqrt(4)
```
This is what i want.
Now, i want to return the function call `g(4)` rather than `sqrt(4)`.
This is what i've tried:
```
def g(x):
with hold:
held = g(SR(x))
return held
```
Sadly it reaches recursion limit and exits, which means it does not hold
the function call.
How can i return the function call from the function itself?
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/160561ff-bf2d-40f8-8e4d-7624f1f5dcf2%40gmail.com.