[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

[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

[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

[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

[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