Skip to main content
In python it is not possible to do this:
::
if temp=do_something() == 42:
foo(temp)
::

And storing it before is not an option?
(you have something very resources-expensive, or changing values)

::
temp = do_something()
temp2 = do_something_else()
if temp == 42:
foo(temp)
elif temp2:
foo2(temp2)
::

Somebody need to hold that result for you:

::
h = Holder()
if h(do_something()) == 42:
foo(h())
elif h(do_something_else()):
foo2(h())

Release history Release notifications | RSS feed

This release

0.0.0 This release

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page