Argument Precedence (possible bug?)

vbgunz vbgunz at gmail.com
Sun Mar 5 15:14:46 CET 2006


Please allow me some time to look at your examples. I get hung up over
the smallest details because in my mind, my approach should have just
worked... I learned about these parameters reading "O'reilly Learning
Python 2nd Edition". On page 217 of the paperback or Chapter 13.5.6 in
the ebook, topic: 'Argument matching: The Gritty Details' mentions the
following in verbatim...

...'''
Moreover, Python internally carries out the following steps to match
arguments before assignment:
1. Assign non-keyword arguments by position.
2. Assign keyword arguments by matching names.
3. Assign extra non-keyword arguments to *name tuple.
4. Assign extra keyword arguments to **name dictionary.
5. Assign default values to unassigned arguments in header.
'''...

As you can probably tell, I tried to follow the steps exactly, except
step 5 got me lost so I tried not to question it. Anyhow, thank you
very much for your time and examples. I will get back to you as soon as
I am done putting your response to trial. Thank you!




More information about the Python-list mailing list