Having problems accepting parameters to a function

7stud bbxx789_05ss at yahoo.com
Tue May 1 18:35:59 EDT 2007


kwargs is not a built in name--it's a made up name used in the
docs.    Would you expect this function to work:

def somefunc(x=10, y=20):
     print a

The best way to figure out a feature of a programming language that
you don't understand is not in the middle of some complex program.
Instead, you should begin a new program, or if you are smart you will
already have several blank programs already created waiting in the
wings for testing purposes.  In the new program, you can play around
with functions, default values and catch all parameters like *a and
**b to figure out how they work.






More information about the Python-list mailing list