classification
Title: Small error in regular expression poker hand example
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: Eddie E, docs@python, ezio.melotti, python-dev
Priority: normal Keywords: patch

Created on 2011-12-16 12:58 by Eddie E, last changed 2011-12-16 23:22 by ezio.melotti. This issue is now closed.

Files
File name Uploaded Description Edit
issue13613.diff ezio.melotti, 2011-12-16 13:28 Patch against 2.7.
Messages (4)
msg149619 - (view) Author: Edmund Eyles (Eddie E) Date: 2011-12-16 12:58
The documentation for Python 2.7.2 has a section of examples for the regular expression match() function, based on a poker hand, at section 7.2.6.1.  These examples show a suit of cards as having 14 cards!  The ace is counted twice, as '1' and 'a'.  Remind me not to play poker against the author.  

I would suggest changing the range of the characters that represent the cards' denominations to [2-9tjqka], with a 't' representing a 10, rather than using a '0', and not using either the '0' or the '1'.
msg149624 - (view) Author: Edmund Eyles (Eddie E) Date: 2011-12-16 13:51
Changes proposed in file 23978 look good to me!

On 16/12/2011 13:28, Ezio Melotti wrote:
>
> Changes by Ezio Melotti<ezio.melotti@gmail.com>:
>
>
> Added file: http://bugs.python.org/file23978/issue13613.diff
>
> _______________________________________
> Python tracker<report@bugs.python.org>
> <http://bugs.python.org/issue13613>
> _______________________________________
>
msg149639 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-12-16 23:20
New changeset 766a21ebf82e by Ezio Melotti in branch '2.7':
#13613: fix example in re doc.
http://hg.python.org/cpython/rev/766a21ebf82e

New changeset 0b86da9d6964 by Ezio Melotti in branch '3.2':
#13613: fix example in re doc.
http://hg.python.org/cpython/rev/0b86da9d6964

New changeset f2e1867f33b8 by Ezio Melotti in branch 'default':
#13613: merge with 3.2.
http://hg.python.org/cpython/rev/f2e1867f33b8
msg149640 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-12-16 23:22
Fixed, thanks for the report!
History
Date User Action Args
2011-12-16 23:22:16ezio.melottisetstatus: open -> closed
resolution: fixed
messages: + msg149640

stage: commit review -> resolved
2011-12-16 23:20:22python-devsetnosy: + python-dev
messages: + msg149639
2011-12-16 13:51:03Eddie Esetmessages: + msg149624
2011-12-16 13:28:17ezio.melottisetfiles: + issue13613.diff
2011-12-16 13:27:58ezio.melottisetfiles: - issue13613.diff
2011-12-16 13:11:46ezio.melottisetfiles: + issue13613.diff
assignee: docs@python -> ezio.melotti
versions: + Python 3.2, Python 3.3
keywords: + patch
nosy: + ezio.melotti

type: behavior -> enhancement
stage: commit review
2011-12-16 12:58:00Eddie Ecreate