Python Forum
arg and keyword arg conflict: what to raise
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
arg and keyword arg conflict: what to raise
#1
i have a function which has keyword arguments for everything. two of them also could be given as regular positional arguments. it tests for something non-None given both ways for each. the intent is to raise an exception when the call is done wrong like this. which exception should i raise for this?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
arg and keyword arg conflict: what to raise - by Skaperen - Jun-19-2020, 11:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  shouldn't this raise an exception? Skaperen 3 2,844 Dec-11-2021, 06:31 PM
Last Post: Skaperen
  annoying conflict: stat Skaperen 2 2,230 Dec-26-2019, 06:04 AM
Last Post: Skaperen
  venv conflict at shell prompt Skaperen 3 2,871 Feb-21-2019, 02:18 AM
Last Post: Larz60+
  import time conflict Skaperen 2 2,867 Oct-15-2017, 07:44 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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