Change Param.__repr__() so it returns the exact expression that could create it; added unit test for Param.__repre__()

This commit is contained in:
Jason Gerard DeRose
2008-11-13 22:16:04 -07:00
parent 1f635269e8
commit 860d391f3e
3 changed files with 31 additions and 15 deletions

View File

@@ -431,11 +431,11 @@ containing a command's arguments and options, respectively, as you can see:
>>> list(api.Command.nudge.args) # Iterates through argument names
['programmer']
>>> api.Command.nudge.args.programmer
Param('programmer', Unicode())
Param('programmer')
>>> list(api.Command.nudge.options) # Iterates through option names
['stuff']
>>> api.Command.nudge.options.stuff
Param('stuff', Unicode())
Param('stuff', default=u'documentation')
>>> api.Command.nudge.options.stuff.default
u'documentation'