Re: Challenging argparse with keyword dest="class"
Chris Angelico via Python-list <[email protected]> Mon, 29 Dec 2025 20:53:38 +1100
| Newsgroups | gmane.comp.python.general |
|---|---|
| Message-ID | <CAPTjJmpj=awKe_DtC9HawNS7-_CVgakFg_7oreJC8Wf5F628iA@mail.gmail.com> |
On Mon, 29 Dec 2025 at 20:40, Schimon Jehudah via Python-list <[email protected]> wrote: > (Pdb) args.class > *** SyntaxError: invalid syntax > (Pdb) > You can use getattr(args, "class") if you like (this works for all objects). But it's probably easier to dodge the issue by changing the spelling of the destination. ChrisA