Python Forum
omitting arguments in function/method calls
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
omitting arguments in function/method calls
#8
if you are just coding a call to some function referenced by a variable named "fun", and what is documented about it is that there are 3 arguments of related values, and you must omit one and it will calculate the missing one from the others and return that calculated value, the only way to do that is with named parameters?

actually, the function i am thinking of uses 4 values and 2 are to be omitted which it will calculate from the 2 that are given. i just asked about 3 to make it a simpler question. i was originally expecting a positional way to do it, like in another language it would be fun(a,,c).
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
RE: omitting arguments in function/method calls - by Skaperen - Nov-24-2019, 08:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  optimizing calls to isinstance() Skaperen 0 901 Nov-27-2022, 01:33 AM
Last Post: Skaperen
  extracting a function/class/method from code Skaperen 5 2,258 Mar-30-2022, 12:13 AM
Last Post: Skaperen
  function/method keyword argument alias Skaperen 1 3,125 Dec-01-2019, 03:56 AM
Last Post: Gribouillis
  how operators are implemented as function calls Skaperen 5 3,502 Dec-15-2018, 03:14 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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