This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients paolobenve, paul.j3
Date 2021-11-02.17:17:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635873439.1.0.417772490423.issue45673@roundup.psfhosted.org>
In-reply-to
Content
This is too big of an example for this board; I think it should have been asked on StackOverFlow.  Or maybe trimmed do to a more compact example.

But in any case, this is normal behavior for argparse.  Type checking, here 'int', is done after the string is allocated to the '-s' argument.

Reserving that string for the required positional requires a form of look ahead that argparse does not currently do.  I think there's an old bug/issue on the topic, but the fix was, if I remember correctly, too complex to simply drop in.

I may look that up later.
History
Date User Action Args
2021-11-02 17:17:19paul.j3setrecipients: + paul.j3, paolobenve
2021-11-02 17:17:19paul.j3setmessageid: <1635873439.1.0.417772490423.issue45673@roundup.psfhosted.org>
2021-11-02 17:17:19paul.j3linkissue45673 messages
2021-11-02 17:17:19paul.j3create