Python Forum
How to pass value from method to function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass value from method to function
#11
I really don't understand your confusion. Your previous post show that you understand how to pass argument to a function.
your function signature should look like this

def list_length(single_method_list)

so it's name must be list_length as that is the name expected by the test case. It takes one argument - single_method_list. It must be instance of SingleMethodList class defined in another module (single_method_list.py file). Note that you should stick to the name of the class as given to you because the test case will try to instantiate variable s_list of this class.
Reply


Messages In This Thread
RE: How to pass value from method to function - by buran - May-23-2017, 03:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to pass encrypted pass to pyodbc script tester_V 0 910 Jul-27-2023, 12:40 AM
Last Post: tester_V
  i want to use type= as a function/method keyword argument Skaperen 9 1,983 Nov-06-2022, 04:28 AM
Last Post: Skaperen
Question How to pass a method as argument in an another method? anilanvesh 6 2,808 Sep-30-2021, 10:18 PM
Last Post: deanhystad
  Regex - Pass Flags as a function argument? muzikman 6 3,690 Sep-06-2021, 03:43 PM
Last Post: muzikman
  Possible to dynamically pass arguments to a function? grimm1111 2 2,246 Feb-21-2021, 05:57 AM
Last Post: deanhystad
  Building a method name in a function ffgth 9 3,339 Oct-19-2020, 01:21 PM
Last Post: buran
  Do I have to pass 85 variables to function? Milfredo 10 4,381 Sep-26-2020, 10:13 PM
Last Post: Milfredo
  Pass by object reference when does it behave like pass by value or reference? mczarnek 2 2,598 Sep-07-2020, 08:02 AM
Last Post: perfringo
  Pass integers to datetime.date function florian 3 2,767 Jul-18-2020, 04:43 AM
Last Post: scidam
  How to pass multiple arguments into function Mekala 4 2,493 Jul-11-2020, 07:03 AM
Last Post: Mekala

Forum Jump:

User Panel Messages

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