Question #11050081

Python and Function parameters?

Hi, Lets say I have a function called cake(a,b=1, c=2,d=3) From what I understand b,c,d are optional parameters, and if nothing is given when cake() is called they will default to 1,2,3 respectively. What I dont understand is how do we specify when calling the function what parameter we are referring to when we leave one or more out? for example cake(1,2,3) could refer to cake(a,b,c), cake(a,c,d), cake(a,b,d) etc. Thanks

2013-10-13 06:59:42

TELL US , if you have any answer

There is NEVER a problem, ONLY a challange!

The helpinganswers.com is a free-to-use knowledgebase.
  The helpinganswers.com was started on: 02.07.2010.
  It's free to register. Once you are a registered user, you can ask questions, or answer them.
  (Unless registration you can just answer the questions anonymously)
  Only english!!! Questions and answers in other languages will be deleted!!

Cheers: the PixelFighters

  Contact: support@helpinganswers.com

C'mon... follow us!

Made by, history, ect.