Re: argparse support of/by argparse

2021-07-23 Thread Chris Angelico
On Fri, Jul 23, 2021 at 5:34 PM Albert-Jan Roskam wrote: > > >>> [1] https://pypi.org/project/clize/ > > > I use and like docopt (https://github.com/docopt/docopt). Is clize a better > choice? > Not necessarily. Both are good. Explore both, see which one makes more sense. ChrisA -- https://mai

Re: argparse support of/by argparse

2021-07-23 Thread Albert-Jan Roskam
>>> [1] https://pypi.org/project/clize/ I use and like docopt (https://github.com/docopt/docopt). Is clize a better choice? -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse support of/by argparse

2021-07-14 Thread Chris Angelico
On Thu, Jul 15, 2021 at 2:57 PM Dan Stromberg wrote: > > > On Mon, Jul 12, 2021 at 12:34 PM Chris Angelico wrote: >> >> On Tue, Jul 13, 2021 at 5:22 AM lucas wrote: >> > Running CPython on it will raise a TypeError, and running Mypy on it >> > will indicate that no issues were found. >> > >> > I

Re: argparse support of/by argparse

2021-07-14 Thread Dan Stromberg
On Mon, Jul 12, 2021 at 12:34 PM Chris Angelico wrote: > On Tue, Jul 13, 2021 at 5:22 AM lucas wrote: > > Running CPython on it will raise a TypeError, and running Mypy on it > > will indicate that no issues were found. > > > > I was wondering if there is any way for me to have mypy detecting th

Re: argparse support of/by argparse

2021-07-13 Thread lucas
Mmmh, that may work just fine ! Thanks for that idea, ChrisA, i'm looking forward to implement that. Best wishes, --lucas On 12/07/2021 21:33, Chris Angelico wrote: On Tue, Jul 13, 2021 at 5:22 AM lucas wrote: Hello everyone, Let us consider this patch of code: import argparse

Re: argparse support of/by argparse

2021-07-12 Thread Chris Angelico
On Tue, Jul 13, 2021 at 5:22 AM lucas wrote: > > Hello everyone, > > Let us consider this patch of code: > > import argparse > > def parse_cli() -> argparse.Namespace: > parser = argparse.ArgumentParser() > parser.add_argument('n', type=int) > return parser.par

argparse support of/by argparse

2021-07-12 Thread lucas
Hello everyone, Let us consider this patch of code: import argparse def parse_cli() -> argparse.Namespace: parser = argparse.ArgumentParser() parser.add_argument('n', type=int) return parser.parse_args() args = parse_cli() print(args.n + ' ') # type err