Mostly Linux & Python syntax notes and hyperlinks.

Friday, February 19, 2010

python: function with optional/default argument

>def testf(foo="blah"):
... print foo
...
>testf("hi there")
hi there
>testf()
blah

No comments:

Post a Comment