Default for ListOption
Martin von Gagern
Martin.vGagern at gmx.net
Wed Apr 21 07:14:00 BST 2010
On 21.04.2010 02:45, Martin Pool wrote:
> You can't specify a default in the ListOption?
No, unfortunately not, the default has to be the empty list.
> I don't think that's a good idea; for things like aliases or shell
> scripting it seems a bit useful for --bar=- to mean "forget I ever
> mentioned bar". So --no-bar is perhaps the easiest for users
OK, agreed.
> and shouldn't break the api.
Could still confront plugins expecting lists with something that is not
a list. Still, I'll try to write an implementation for this.
> Some other programs seem to handle this with --bar=none though that's
> a bit ugly with None vs 'none'.
It's also ugly in cases where the user can choose possible values, so
that "none" might well be a normal value.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100421/9b15114d/attachment.pgp
More information about the bazaar
mailing list