<[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

> class MultipleRegression:
>    def __init__(self, dbh, regressors, fund):
>        self.dbh = dbh
>        self.regressors = regressors
>
> and I want to be able to enter regressors as a list like
> MultipleRegression(dbh, [1,2,3,4], 5).  But when I do this only the 1
> gets passed to regressors and thus to self.regressors.

Really?

    class MultipleRegression:
        def __init__(self, dbh, regressors, fund):
            self.dbh = dbh
            self.regressors = regressors
    foo = MultipleRegression(42, [1,2,3,4], 5)
    print foo.regressors

prints [1,2,3,4]

Try it and see.


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to