#23 default values should be displayed in help

closed
5
2006-06-13
2005-11-29
No

Default values should be automatically appended to the
documentation. Maybe between parenthesis after the help
text.

Now I do things like:
optsParser.add_option( "-l", "--local-server-port",
type="int",
dest="localPort", default=49001,
help=_("local server port where
original server "
"data will be repeated (49001)")

The 49001 info is repeated, it'd be nice to have it
automatically shown in help.

Discussion

  • Greg Ward

    Greg Ward - 2006-06-13
    • status: open --> closed
     
  • Greg Ward

    Greg Ward - 2006-06-13

    Logged In: YES
    user_id=14422

    Implemented in Optik 1.5 (Python 2.4). Oops, looks like I
    never documented it ... sigh. Anyways, just put "%default"
    in your help strings and you'll be fine.

     

Log in to post a comment.