Extending Python - Understanding Flags...

John Machin sjmachin at lexicon.net
Tue Jun 13 07:20:53 CEST 2006


On 13/06/2006 3:11 PM, John Machin wrote:

> def bfunction(foo=0, bar="plugh", zot=None):
> # keyword args, caller can do:
> bfunction(zot=10**100) # using a keyword: args foo & bar get default values
> bfunction(10, "xyzzy") # positional: foo = 10; bar = "xyzzy"; zot = 10**100

The last line above should end with
     zot = None
instead of
     zot = 10**100




More information about the Python-list mailing list