Dana Robinson wrote: > Hello, > > Suppose you have a situation where you have a large number of command-line > options that you will parse with getopt. You want to keep track of these > as you move around in the code and do various things. > > Is it more Pythonic to: > > Have the functions take large numbers of parameters. > > or > > Create an options class to pass the options around. > IMHO the above or a dictionary. > > I personally think the latter would look a lot cleaner once the number of > options got up to around a half dozen, but I usually see the "large number > of parameters" style in other people's code. I suppose I can lessen some > of the noise by using Python's rules for argument defaults, but I think > that just adds to the confusion. > > Thanks, > > Dana Robinson > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > >
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor