Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
range as a command
#7
I'm inclined to think that Python's stack trace is one of the most friendly error reports. Why put much effort in writing pretty error reports only to discover that their main effect is to hide the actual cause of the error?

The biggest flaw that I see in the above code is the summary treatment of the command line arguments. I think using a specialized module such as argparse is almost mandatory. This is discussed regularly in this forum
  • Argparse is in the standard lib, a great advantage
  • Click has many supporters
  • Plumbum.cli is my favorite one
  • ... many others
Reply


Messages In This Thread
range as a command - by Skaperen - Aug-04-2020, 11:55 PM
RE: range as a command - by ndc85430 - Aug-05-2020, 05:51 AM
RE: range as a command - by Skaperen - Aug-05-2020, 10:52 PM
RE: range as a command - by ndc85430 - Aug-06-2020, 04:29 AM
RE: range as a command - by Skaperen - Aug-06-2020, 10:36 PM
RE: range as a command - by ndc85430 - Aug-07-2020, 05:49 AM
RE: range as a command - by Gribouillis - Aug-07-2020, 07:03 AM
RE: range as a command - by Skaperen - Aug-07-2020, 10:08 PM
RE: range as a command - by Gribouillis - Aug-08-2020, 06:27 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020