On 2023-01-27 21:03:39 -0800, Jach Feng wrote:
> I have to admit that I don't know the background upon which the
> argparse was built. The good side is that I don't carry its historical
> knowledge ( or burden?), that's why I can use it in a new way

I don't see what's new about that.

> which may make someone feel uneasy.

It seems that the person who feels most uneasy about it is yourself
because it doesn't work like you want it to.


> The reason I am still keep on using argparse on this "one positional
> argument only" CLI app is that I can't see what advantage I can get
> when writing code to handling sys.argv directly for the following two
> situations,

It would almost certainly be shorter and easier to understand,
especially since you are *also* handling sys.argv directly in your code
to prevent argparse to work as designed.

But since you are probably the only person who will have to read your
code in the future that's not our problem.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | h...@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to