Commit 827ea7cf authored by Guido van Rossum's avatar Guido van Rossum

Last minut changes for \B, \S (?). AMK.

parent f2e917e8
...@@ -463,7 +463,7 @@ class WordBound(Instruction): ...@@ -463,7 +463,7 @@ class WordBound(Instruction):
class NotWordBound(Instruction): class NotWordBound(Instruction):
name = 'notwordbound' name = 'notwordbound'
def __init__(self): def __init__(self):
Instruction.__init__(self, chr(18)) Instruction.__init__(self, chr(19))
class SyntaxSpec(Instruction): class SyntaxSpec(Instruction):
name = 'syntaxspec' name = 'syntaxspec'
...@@ -748,7 +748,7 @@ def expand_escape(pattern, index, context=NORMAL): ...@@ -748,7 +748,7 @@ def expand_escape(pattern, index, context=NORMAL):
elif context == CHARCLASS: elif context == CHARCLASS:
set = [] set = []
for char in reop.syntax_table.keys(): for char in reop.syntax_table.keys():
if not reop.syntax_table[char] & reop.word: if not reop.syntax_table[char] & reop.whitespace:
set.append(char) set.append(char)
return SET, set, index + 1 return SET, set, index + 1
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment