paul j3 <ajipa...@gmail.com> added the comment:

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.

----------
nosy: +paul.j3

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45673>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to