Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Caches a result, and returns it. Useful in if statements.

Project Description
In python it is not possible to do this:
if temp=do_something() == 42:

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:
elif temp2:

Somebody need to hold that result for you:

h = Holder()
if h(do_something()) == 42:
elif h(do_something_else()):
Release History

Release History

This version
History Node


Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting