Christopher Emery wrote: > Hello Peter, > > Thank you this is much appreciated! It is much clear now. Thank you > > PO: Also, if you make it a habit to keep long option and dest in sync > (something you get for free if you only specify the option) you can > deduce the attribute name used in the script from its commandline > interface. > CE: Can you please explain this deeper please? I am not sure if I am > getting it.
Suppose a have a script doit.py that accepts a flag -f. You have not used it for a while, then you try it again and decide you want to make a modification related to the -f option or fix some cornercase where it doesn't work as you expect. If the script was written by me you can run ./doit -h to find out that the long name for -f is --enable-foo, open the sript with an editor and search for the string args.enable_foo to find the entry point to the code related to the -f/--enable-foo option. It's no big deal, but I find it convenient. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor