[issue13613] Small error in regular expression poker hand example
New submission from Edmund Eyles <hotel@heddonsgate.co.uk>: 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'. ---------- assignee: docs@python components: Documentation messages: 149619 nosy: Eddie E, docs@python priority: normal severity: normal status: open title: Small error in regular expression poker hand example type: behavior versions: Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13613> _______________________________________
Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- assignee: docs@python -> ezio.melotti keywords: +patch nosy: +ezio.melotti stage: -> commit review type: behavior -> enhancement versions: +Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23977/issue13613.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13613> _______________________________________
Changes by Ezio Melotti <ezio.melotti@gmail.com>: Removed file: http://bugs.python.org/file23977/issue13613.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13613> _______________________________________
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> _______________________________________
Edmund Eyles <hotel@heddonsgate.co.uk> added the comment: 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> _______________________________________
---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13613> _______________________________________
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment: 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 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13613> _______________________________________
Ezio Melotti <ezio.melotti@gmail.com> added the comment: Fixed, thanks for the report! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13613> _______________________________________
participants (3)
-
Edmund Eyles -
Ezio Melotti -
Roundup Robot