Python Forum
Passing argument from top-level function to embedded function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing argument from top-level function to embedded function
#1
Hi,
This is a simplified example. But basically, I have function within a function. I want to pass the argument from the top-level function to the embedded function, but it doesn't work. How do I solve this?
Thank you
def Check(file_name, mh_criticalval):
test_file=file_name

def eval_value(excel_sht, excel_col, mh_value):
   if excel_sht.cell(row=i, column=excel_col)>mh_value:
        cell_b=excel_sht.cell(row=i, column=excel_col).value='OK'

eval_value(sht, 9, mh_criticalval)
Check('test.xlsm',1)
Reply


Messages In This Thread
Passing argument from top-level function to embedded function - by JaneTan - Oct-15-2020, 04:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The function of double underscore back and front in a class function name? Pedroski55 9 676 Feb-19-2024, 03:51 PM
Last Post: deanhystad
  mutable argument in function definition akbarza 1 488 Dec-15-2023, 02:00 PM
Last Post: deanhystad
Information How to take url in telegram bot user input and put it as an argument in a function? askfriends 0 1,100 Dec-25-2022, 03:00 PM
Last Post: askfriends
  passing dictionary to the function mark588 2 981 Dec-19-2022, 07:28 PM
Last Post: deanhystad
  i want to use type= as a function/method keyword argument Skaperen 9 1,876 Nov-06-2022, 04:28 AM
Last Post: Skaperen
  Taking any 2d image and passing it to create a level iki_a_toure 4 1,051 Oct-19-2022, 06:35 AM
Last Post: iki_a_toure
  Exit function from nested function based on user input Turtle 5 2,930 Oct-10-2021, 12:55 AM
Last Post: Turtle
  Passing Argument Errors cosmarchy 6 2,446 Sep-29-2021, 06:09 AM
Last Post: snippsat
  Regex - Pass Flags as a function argument? muzikman 6 3,612 Sep-06-2021, 03:43 PM
Last Post: muzikman
Question Stopping a parent function from a nested function? wallgraffiti 1 3,687 May-02-2021, 12:21 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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