Kaydet (Commit) b05e5501 authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

Fixed #2677 -- Removed the need to import sre and hence avoid a

DeprecationWarning. Thanks, Tom Tobin.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 8f7ab8ef
......@@ -3,12 +3,11 @@ Iterator based sre token scanner
"""
import sre_parse, sre_compile, sre_constants
from sre_constants import BRANCH, SUBPATTERN
from sre import VERBOSE, MULTILINE, DOTALL
import re
__all__ = ['Scanner', 'pattern']
FLAGS = (VERBOSE | MULTILINE | DOTALL)
FLAGS = (re.VERBOSE | re.MULTILINE | re.DOTALL)
class Scanner(object):
def __init__(self, lexicon, flags=FLAGS):
self.actions = [None]
......
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