How to create a singleton class based on its input?
<p>I have a class defined as </p>

<pre><code>class Conditional_Singleton(object):
    def __init__(self, condition=None):
        self.initialization = some_func_of(condition)
</code></pre>

<p>Since the "initialization" step really takes a lot of time to run and the output could be huge, I would really like that the class not be recreated over and over again given the same input, but do so once the input changes. Any ideas? </p>
