Python Forum
pass value to function with * and/or **
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pass value to function with * and/or **
#1
if i define a function like:
def foo(*boo,**hoo):
    ...
    return (boo,hoo)
then call it while passing a created type that operates like a list or dictionary, will these values in the function (e.g. boo and hoo in the above code) have the types as passed or will they be converted to list or dictionary, as appropriate?
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
pass value to function with * and/or ** - by Skaperen - Jan-10-2020, 12:45 AM

Forum Jump:

User Panel Messages

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