Function arguments optional in python

I like it. It’s so simple and flexible.

def main(argv=None):
if argv is None:
argv = sys.argv

This is in place of

def main(sys.argv)

Posted by admica   @   17 December 2009

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« Adobe Flash support in Google Chrome beta using gnash-plugin
Next Post
Install swfdec-mozilla flash plugin for browsers from binary or source »
Powered by Wordpress   |   Lunated designed by ZenVerse