[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-12-11 Thread Ezra Berch

Ezra Berch added the comment:

Here's a patch to do this, including some tests for the changed behavior.

--
keywords: +patch
nosy: +ezberch
Added file: http://bugs.python.org/file28285/issue15045.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16203] Proposal: add re.fullmatch() method

2012-11-27 Thread Ezra Berch

Ezra Berch added the comment:

Patch attached. I've taken a slightly different approach than what has been 
discussed here: rather than define a new fullmatch() function and method, I've 
defined a new re.FULLMATCH flag for match(). So an example would be

re.match('abc','abc',re.FULLMATCH)

The implementation is basically what has been discussed here, except done when 
the regular expression is compiled rather than at the user level.

--
keywords: +patch
nosy: +ezberch
Added file: http://bugs.python.org/file28140/issue16203.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16203
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13370] test_ctypes fails on osx 10.7

2012-02-05 Thread Ezra Berch

Ezra Berch ezrabe...@mac.com added the comment:

The reason for this issue appears to be a bug in the clang optimizer. This is 
why it only shows up with debug disabled. When I compile with -O0 instead of 
-O3, the test passes.

This issue from the clang tracker may be the same issue:
http://llvm.org/bugs/show_bug.cgi?id=9524

--
nosy: +ezberch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13370
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

2012-02-02 Thread Ezra Berch

Ezra Berch ezrabe...@mac.com added the comment:

Sorry, I guess I wasn't clear. The trailing-newlines issue was an issue with 
the conditional expression ncoghlan suggested. It's fixed in the patch I 
submitted (and covered by the tests).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13857
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

2012-01-30 Thread Ezra Berch

Ezra Berch ezrabe...@mac.com added the comment:

I've created a patch using the conditional expression in msg151945. The one 
problem I found with it is that when the input string is terminated by a 
newline it removes that newline.

I've added an optional third argument: a function which determines which lines 
are indented. If omitted, the default behavior is to indent non-empty lines.

--
keywords: +patch
nosy: +ezberch
Added file: http://bugs.python.org/file24374/indent.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13857
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com