Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs
[ python-Bugs-1601630 ] getopt Documentation improvement
 

Index | Next | Previous | View Flat


noreply at sourceforge

Nov 23, 2006, 1:39 AM


Views: 251
Permalink
[ python-Bugs-1601630 ] getopt Documentation improvement

Bugs item #1601630, was opened at 2006-11-23 09:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601630&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas Guettler (guettli)
Assigned to: Nobody/Anonymous (nobody)
Summary: getopt Documentation improvement

Initial Comment:
Hi,

I think the documentation of getopt could be
improved

The example at the buttom:
http://docs.python.org/lib/module-getopt.html

1. Print str(exc)
except getopt.GetoptError, exc:
print str(exc)
usage()

2. In the loop: use elif and else

for o, a in opts:
if o == "-v":
verbose = True
elif o in ("-h", "--help"):
usage()
sys.exit()
else:
raise AssertionError(
"Unparsed Paremter: %s %s" %(o, a))

3. I would support --verbose, too



----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601630&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Subject User Time
[ python-Bugs-1601630 ] getopt Documentation improvement noreply at sourceforge Nov 23, 2006, 1:39 AM
    [ python-Bugs-1601630 ] getopt Documentation improvement noreply at sourceforge Nov 23, 2006, 1:55 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.