Mailing List Archive

[issue14034] Add argparse howto
Ezio Melotti <ezio.melotti@gmail.com> added the comment:

> Would be nice to get another review.

I left several comments on rietveld.

Overall the tutorial seems really nice and easy to follow (except a couple of parts, noted in the comments).

I would replace all the uses of pow(x, y) with x**y in the code, and possibly with x^y in the output/descriptions (x**y is probably fine there too).

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14034] Add argparse howto [ In reply to ]
Ezio Melotti <ezio.melotti@gmail.com> added the comment:

A few more comments:

* in the review I mentioned highlighting specific code lines (this would be really great given the incremental nature of the howto), but apparently that requires a pygment 1.1 [0].

* all the output examples could use ".. highlightlang:: sh", but:
1. the sh highlighter is not so good imho;
2. you would have to switch back and forth from sh and python (unless there's a better way to do it);

* the sidebar box with the tutorial looks better if you put it between the <hr> and the introductory paragraph.

Maybe Georg has something to say about the first two comments.

[0]: see last example in http://sphinx.pocoo.org/markup/code.html#line-numbers

----------
nosy: +georg.brandl

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14034] Add argparse howto [ In reply to ]
Tshepang Lekhonkhobe <tshepang@gmail.com> added the comment:

addressing the bulk of your comments

this does not address last message, where you want the lines highlighted; it will be rather tedious; to me the code snippets are short enough, removing the need for highlighting

----------
Added file: http://bugs.python.org/file25409/argparse_howto4.patch

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14034] Add argparse howto [ In reply to ]
Tshepang Lekhonkhobe <tshepang@gmail.com> added the comment:

Thanks so much for your thorough attention to detail. I've addressed all your latest comments.

----------
Added file: http://bugs.python.org/file25417/argparse_howto5.patch

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14034] Add argparse howto [ In reply to ]
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment:

New changeset 48385618525b by Ezio Melotti in branch '2.7':
#14034: added the argparse tutorial. Patch by Tshepang Lekhonkhobe.
http://hg.python.org/cpython/rev/48385618525b

New changeset 11703cb2a2f3 by Ezio Melotti in branch '3.2':
#14034: added the argparse tutorial. Patch by Tshepang Lekhonkhobe.
http://hg.python.org/cpython/rev/11703cb2a2f3

New changeset 645969f4193b by Ezio Melotti in branch 'default':
#14034: merge argparse tutorial from 3.2.
http://hg.python.org/cpython/rev/645969f4193b

----------
nosy: +python-dev

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14034] Add argparse howto [ In reply to ]
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment:

New changeset 549aa1460811 by Ezio Melotti in branch '2.7':
#14034: adapt to Python 2 and fix indentation.
http://hg.python.org/cpython/rev/549aa1460811

New changeset d5b7be0629c0 by Ezio Melotti in branch '3.2':
#14034: fix indentation.
http://hg.python.org/cpython/rev/d5b7be0629c0

New changeset e14c860f6eee by Ezio Melotti in branch 'default':
#14034: merge indentation fixes from 3.2.
http://hg.python.org/cpython/rev/e14c860f6eee

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14034] Add argparse howto [ In reply to ]
Ezio Melotti <ezio.melotti@gmail.com> added the comment:

Committed, thanks for the patch!

(Note that the example with "TypeError: unorderable types: NoneType() >= int()" works fine in Python 2 (by accident), and that I left it unchanged. Some error messages are also different on Python 2, but I left the ones from Python 3.)

----------
assignee: docs@python -> ezio.melotti
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue14034] Add argparse howto [ In reply to ]
Tshepang Lekhonkhobe <tshepang@gmail.com> added the comment:

thanks so much for your rime in reviewing and committing

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com