Python Forum
how to make a keyword arg w/o a default value?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to make a keyword arg w/o a default value?
#7
(Jun-29-2020, 07:40 PM)Skaperen Wrote: i'm trying to make it be a required argument that can be given either positional or keyword and be required one way or the other.
well that sounds exactly like positional argument - it's required and can be supplied either as positional or keyword.
the only drawback is - if you supply it as keyword all arguments after that one must be supplied as keyword as well
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: how to make a keyword arg w/o a default value? - by buran - Jun-29-2020, 07:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Find a specific keyword after another keyword and change the output sgtmcc 5 1,928 Oct-05-2023, 07:41 PM
Last Post: deanhystad
  Trying to search and make new column from the keyword. dgarg 1 2,035 Dec-20-2021, 08:41 PM
Last Post: deanhystad
  How to make the python default language be 3.6 instead of 2.7 sylas 4 7,907 Jul-06-2018, 06:11 AM
Last Post: sylas

Forum Jump:

User Panel Messages

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