Python Forum
Using a lambda function within another function
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using a lambda function within another function
#6
Sort of, the number of function arguments must be matched, unless optional. For example:
def foo(a, b):
    ...
must be passed two arguments.
but:
def foo(a, b=1):
    ...
Only requires a, but b is optional, and defaults to 1 if not provided.
Reply


Messages In This Thread
RE: Using a lambda function within another function - by Larz60+ - Jan-08-2019, 12:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The function of double underscore back and front in a class function name? Pedroski55 9 844 Feb-19-2024, 03:51 PM
Last Post: deanhystad
  Add two resultant fields from python lambda function klllmmm 4 998 Jun-06-2023, 05:11 PM
Last Post: rajeshgk
  Exit function from nested function based on user input Turtle 5 3,042 Oct-10-2021, 12:55 AM
Last Post: Turtle
Question Stopping a parent function from a nested function? wallgraffiti 1 3,739 May-02-2021, 12:21 PM
Last Post: Gribouillis
  Writing a lambda function that sorts dictionary GJG 1 2,062 Mar-09-2021, 06:44 PM
Last Post: buran
Question exiting the outer function from the inner function banidjamali 3 3,666 Feb-27-2021, 09:47 AM
Last Post: banidjamali
  Passing argument from top-level function to embedded function JaneTan 2 2,321 Oct-15-2020, 03:50 PM
Last Post: deanhystad
  use NULL as function parameter which is a pointer function? oyster 0 2,542 Jul-11-2020, 09:02 AM
Last Post: oyster
  How to use function result in another function Ayckinn 4 2,907 Jun-16-2020, 04:50 PM
Last Post: Ayckinn
  translating lambda in function fabs 1 2,203 Apr-28-2020, 05:18 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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