[issue22415] Fix re debugging output

2014-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d4630b1c8792 by Serhiy Storchaka in branch '2.7':
Fixed issue #22415 number in Misc/NEWS for changeset c925b436467a.
https://hg.python.org/cpython/rev/d4630b1c8792

New changeset 7b92518b2c21 by Serhiy Storchaka in branch '3.4':
Fixed issue #22415 number in Misc/NEWS for changeset e99a1df8db36.
https://hg.python.org/cpython/rev/7b92518b2c21

New changeset fb93a04832df by Serhiy Storchaka in branch 'default':
Fixed issue #22415 number in Misc/NEWS for changeset fe287268e97b.
https://hg.python.org/cpython/rev/fb93a04832df

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22415] Fix re debugging output

2014-09-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed with Antoine's suggestion. Thank you Antoine.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22415] Fix re debugging output

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If there are no objections I'll commit the patch soon.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22415] Fix re debugging output

2014-09-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch fixes some issues in debugging output of the compiling of 
regular expression with the re.DEBUG flag.

1. Fixed the handling of the GROUPREF_EXISTS opcode.

Example:
>>> re.compile(r'(ab)(?(1)cd|ef)', re.DEBUG)

Before patch ("yes" and "no" branches are not separated):

subpattern 1
  literal 97
  literal 98
subpattern None
  groupref_exists 1
literal 99
literal 100
literal 101
literal 102

After patch:

subpattern 1
  literal 97
  literal 98
subpattern None
  groupref_exists 1
literal 99
literal 100
  or
literal 101
literal 102

2. Got rid of trailing spaces in Python 3.

3. Used named opcode constants instead of inlined strings.

4. Simplified and modernized the code.

5. Updated test to cover more code.

--
components: Library (Lib), Regular Expressions
files: re_debug.patch
keywords: patch
messages: 226903
nosy: ezio.melotti, mrabarnett, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fix re debugging output
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36620/re_debug.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com