On Tue, Dec 18, 2012 at 8:13 PM, Steven D'Aprano <st...@pearwood.info>wrote:
> On 19/12/12 07:39, rail shafigulin wrote: > > I currently have it done this way. It just seems a bit odd that I have to >> arrange it manually. >> > > What's so special about alphabetical order? Wouldn't it make more sense for > related options to be kept together? > > E.g.: > > Usage: make_sandwich [OPTIONS] > > --bread KIND white, multigrain, rye, black, sourdough or > wholemeal. > --style "light"|"dark" Defaults to "light" if not given. Ignored > unless bread=rye. > --meat KIND chicken, ham, turkey, pastrami, salami, spam > or beef > > rather than: > > --bread KIND white, multigrain, rye, black, sourdough or > wholemeal. > --meat KIND chicken, ham, turkey, pastrami, salami, spam > or beef > --style "light"|"dark" Defaults to "light" if not given. Ignored > unless bread=rye. > > > Obviously with only three options it doesn't make much difference, but > suppose > you had two dozen options. Alphabetical order means that related options > will be > scattered all over the place. > > > > -- > Steven > ______________________________**_________________ > > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor> > There is nothing special about alphabetical order. You are right, it is better to arrange related options together. For my script, I don't have related options and simply want to arrange them in alphabetical order.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor