New submission from Pythass <crazys...@live.it>:

By using argparse, and by passing a string as argument that has both a dash "-" 
and colon ":", python returns "expected one argument" error, despite it works 
when I use only "-" without ":".

An example of code is attached at the ticket.

Examples of triggering "expected one argument" error:
python test.py -u -1:00
python test.py -u -1:

Examples of NON triggering "expected one argument" error:
python test.py -u -1
python test.py -u=-1:00

----------
components: Parser
files: test.py
messages: 415031
nosy: Pythass, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: argparse - "expected one argument" when used -: in argument
type: compile error
versions: Python 3.10
Added file: https://bugs.python.org/file50668/test.py

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

Reply via email to