Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset fc89e09ca2fc by Ezio Melotti in branch '2.7':
#10713: Improve documentation for \b and \B and add a few tests. Initial patch
and tests by Martin Pool.
http://hg.python.org/cpython/rev/fc89e09ca2fc
New changeset
Ezio Melotti ezio.melo...@gmail.com added the comment:
Fixed, thanks for the patch!
--
assignee: docs@python - ezio.melotti
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Ezio Melotti ezio.melo...@gmail.com added the comment:
This is a new patch based on Martin work.
I don't think it's necessary to explain what happens while using r'\b' or r'\B'
on an empty string in the doc -- that's not a common case and it might end up
confusing users. I think however that
Éric Araujo mer...@netwok.org added the comment:
Like it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10713
___
___
Python-bugs-list mailing
Martin Pool m...@sourcefrog.net added the comment:
Note, 366 above confirms it's never true for an empty string. The
documentation states that \B is just the opposite of \b yet
re.match(r'\b', '') returns None and so does \B so \B isn't the opposite
of \b in all cases.
This is also a bit
Changes by Ron Ridley ronste...@gmail.com:
--
nosy: +Ron.Ridley
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10713
___
___
Python-bugs-list
Ralph Corderoy ralph-pythonb...@inputplus.co.uk added the comment:
Examining the source of Ubuntu's python2.6 2.6.6-5ubuntu1 package
suggests beyond the limits of the string is considered \W, like Perl.
Modules/_sre.c:
336 LOCAL(int)
337 SRE_AT(SRE_STATE* state, SRE_CHAR*
Éric Araujo mer...@netwok.org added the comment:
Thanks for the report. Would you be interested in experimenting and/or reading
the code to find the anwser and propose a doc patch?
--
keywords: +easy
nosy: +eric.araujo
stage: - needs patch
versions: +Python 2.7, Python 3.1, Python
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10713
___
___
New submission from Ralph Corderoy ralph-pythonb...@inputplus.co.uk:
The re module defines \b in a regexp to need \w one side and \W the other.
What about when the end of the string or line is involved? perlre(1) says
that's treated as a \W. Python should precisely document that case too.
10 matches
Mail list logo