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

Mailing List Archive: Python: Bugs

[ python-Bugs-1601630 ] getopt Documentation improvement

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


noreply at sourceforge

Nov 23, 2006, 1:39 AM

Post #1 of 2 (249 views)
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


noreply at sourceforge

Nov 23, 2006, 1:55 AM

Post #2 of 2 (240 views)
Permalink
[ python-Bugs-1601630 ] getopt Documentation improvement [In reply to]

Bugs item #1601630, was opened at 2006-11-23 09:39
Message generated for change (Comment added) made by gbrandl
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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Thomas Guettler (guettli)
>Assigned to: Georg Brandl (gbrandl)
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



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

>Comment By: Georg Brandl (gbrandl)
Date: 2006-11-23 09:55

Message:
Logged In: YES
user_id=849994
Originator: NO

Thanks, committed something along your lines in rev. 52833, 52834 (2.5).

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

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

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


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