Title: HOWTOs Argparse tutorial - code example raises SyntaxError
Type: behavior Stage: resolved
Components: Documentation Versions: Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: docs@python, ezio.melotti, python-dev, simon.hayward, tshepang
Priority: normal Keywords: patch

Created on 2012-07-13 13:18 by simon.hayward, last changed 2012-07-13 19:41 by ezio.melotti. This issue is now closed.

File name Uploaded Description Edit
argparse-howto.patch simon.hayward, 2012-07-13 13:18 review
Messages (3)
msg165381 - (view) Author: Simon Hayward (simon.hayward) Date: 2012-07-13 13:18
HOWTOs - Argparse Tutorial, the code example will raise a syntax error when run. A trailing python3 reference (if called as a function): 'end=""', to suppresses a newline remains.

print "{}^{} == ".format(args.x, args.y), end=""

Should read:

print "{}^{} ==".format(args.x, args.y),
msg165412 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-07-13 19:40
New changeset de18c4470ff1 by Ezio Melotti in branch '2.7':
#15345: fix SyntaxError in argparse tutorial example.  Patch by Simon Hayward.
msg165413 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-07-13 19:41
Fixed, thanks for the patch!
Date User Action Args
2012-07-13 19:41:51ezio.melottisetstatus: open -> closed

assignee: docs@python -> ezio.melotti

nosy: + ezio.melotti
messages: + msg165413
resolution: fixed
stage: resolved
2012-07-13 19:40:48python-devsetnosy: + python-dev
messages: + msg165412
2012-07-13 18:19:50tshepangsetnosy: + tshepang
2012-07-13 13:18:27simon.haywardcreate