Results 637 comments of Antony Lee

My preference would be to use Annotated. I agree with your point about not changing the CLI function itself, but Annotated is spefically designed to include "context-specific metadata" (that's what...

We depend indirectly on typing_extensions (via typing_inspect), which brings in support for Annotated on older Pythons (in fact, we already (briefly) use Annotated internally, in defopt.signature).

I don't think this is possible right now. Something like #95 is perhaps possible. Alternatively I thought that we may be able to introduce a type alias like `defopt.Count =...

Thanks for the suggestion. Let's keep the discussion in #95 for now, as I think the two requests share some points.

Right now there is no support for Annotated at all, the suggestion is also to add such support.

I think this is a reasonable feature request, essentially requiring the use of parse_known_args and then "manually" parsing the remainder args into `--flag value` (or `--flag value1 value2` for pairs...

This looks like a different request? What I had in mind was `--foo 1 --bar 2` mapping to `{"foo": 1, "bar": 2}`. In particular, for your case, it would make...

The classical way to do this (if I understand your request correctly) would be to use `--` to mark everything after as positional args (see end of https://docs.python.org/3/library/argparse.html#arguments-containing).

I agree the API provided by defopt is not so great when multiple commands share the same parameters. The solution I've been thinking about is to support dataclasses, e.g. ```python...

I got that from fire's doc, but if that's what you want, why don't you just use fire? In other words, what benefits do you expect from using defopt instead?