Hello All,

I'm making a class and the parameters I'm feeding the class is getting quite
large. I'm up
to 8 now. Is there any rules of thumb for classes with a lot of parameters?
I was thinking
to put the parameters into a tuple and then in the __init__ of the class,
iterate over the tuple
and assign attributes.

Right now my class basically looks like this:

class Foo(object):
    def __init__(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8):
        ...

Cheers

T
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to