Author Chris Seto2
Recipients Chris Seto2, ezio.melotti, mrabarnett
Date 2017-04-27.14:07:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493302074.44.0.42828185983.issue30187@psf.upfronthosting.co.za>
In-reply-to
Content
Expected behavior:
~ ❯❯❯ pyenv shell 3.5.2
~ ❯❯❯ python --version
Python 3.5.2
~ ❯❯❯ python
Python 3.5.2 (default, Oct 24 2016, 00:12:20)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.compile('[^\B]')
re.compile('[^\\B]')
>>> re.compile(r'[^\B]')
re.compile('[^\\B]')

Actual:
~ ❯❯❯ pyenv shell 3.6.0
~ ❯❯❯ python --version
Python 3.6.0
~ ❯❯❯ python
Python 3.6.0 (default, Apr 26 2017, 17:24:07)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.compile('[^\B]')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 233, in compile
    return _compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 301, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_compile.py", line 562, in compile
    p = sre_parse.parse(p, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 856, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 415, in _parse_sub
    itemsappend(_parse(source, state, verbose))
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 526, in _parse
    code1 = _class_escape(source, this)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 336, in _class_escape
    raise source.error('bad escape %s' % escape, len(escape))
sre_constants.error: bad escape \B at position 2

>>> re.compile(r'[^\B]')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 233, in compile
    return _compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/re.py", line 301, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_compile.py", line 562, in compile
    p = sre_parse.parse(p, flags)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 856, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 415, in _parse_sub
    itemsappend(_parse(source, state, verbose))
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 526, in _parse
    code1 = _class_escape(source, this)
  File "/Users/chrisseto/.pyenv/versions/3.6.0/lib/python3.6/sre_parse.py", line 336, in _class_escape
    raise source.error('bad escape %s' % escape, len(escape))
sre_constants.error: bad escape \B at position 2
History
Date User Action Args
2017-04-27 14:07:54Chris Seto2setrecipients: + Chris Seto2, ezio.melotti, mrabarnett
2017-04-27 14:07:54Chris Seto2setmessageid: <1493302074.44.0.42828185983.issue30187@psf.upfronthosting.co.za>
2017-04-27 14:07:54Chris Seto2linkissue30187 messages
2017-04-27 14:07:54Chris Seto2create