Python Class instantiation: What does it mean when a class is called without accompanying arguments?
<p>I am trying to understand some code that I have found on github. Essentially there is a class called "HistoricCSVDataHandler" that has been imported from another module. In the main method this class is passed as a parameter to another class "backtest". </p>

<p>How can a class name that does not represent a instantiated variable be called without raising a NameError. </p>

<p>Or simply put :</p>

<p>Why/How is the class being called as:</p>

<pre><code>Backtest(HistoricCSVDataHandler)
</code></pre>

<p>Rather than:</p>

<pre><code>CSV_Handler = HistoricCSVDataHandler(foo,bar,etc)
Backtest(CSV_Handler)
</code></pre>

<p><a href="https://github.com/djunh1/event-driven-backtesting/blob/master/snp_forecast.py" rel="nofollow">See line 110 for code.</a></p>

<p>Regards</p>

<p>A link to the code would be useful, but in python you can pass uninstantiated objects around like this just fine. i.e.:</p>

<pre><code>def f(uninst_class, arg):
     return uninst_class(arg)
</code></pre>

python class