This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | gpolo |
|---|---|
| Recipients | gpolo |
| Date | 2008年03月21日.15:41:35 |
| SpamBayes Score | 0.07921965 |
| Marked as misclassified | No |
| Message-id | <1206114097.48.0.657635538411.issue2444@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Hi, Doing (opts, args) = parser.parse_args(), supposing parser is an OptionParser instance, gets you an instance of class Values into opts. This patch adds the __iter__ method to the class Values so it is possible to iterate over the options you could have received. This is useful when all your options are required and you don't want to use a lot of if's to check if they are all there (for example). Right now it is possible to do this but you would have to iterate over opts.__dict__, an ugly way as I see. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年03月21日 15:41:37 | gpolo | set | spambayes_score: 0.0792196 -> 0.07921965 recipients: + gpolo |
| 2008年03月21日 15:41:37 | gpolo | set | spambayes_score: 0.0792196 -> 0.0792196 messageid: <1206114097.48.0.657635538411.issue2444@psf.upfronthosting.co.za> |
| 2008年03月21日 15:41:36 | gpolo | link | issue2444 messages |
| 2008年03月21日 15:41:36 | gpolo | create | |