Python Forum
Decorator inhibits execution of function if non-None parameter not supplied
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decorator inhibits execution of function if non-None parameter not supplied
#2
I'm confused. From what you're saying, it sounds like the behavior should vary based on the contents of args, however it's only based on the length of sys.argv, which doesn't make sense to me from your description (partly because sys.argv will be shorter, not contain None).

Could you provide multiple sample cases where this code's behavior is demonstrated? Also, you probably want to pass along **kwargs as well as *args.
Reply


Messages In This Thread
RE: Decorator inhibits execution of function if non-None parameter not supplied - by micseydel - Feb-26-2018, 06:33 PM

Forum Jump:

User Panel Messages

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