This commit is contained in:
jab 2014-10-11 13:29:17 -04:00
parent b8e68cb3d6
commit 95392b5c8b
1 changed files with 4 additions and 5 deletions

View File

@ -249,8 +249,7 @@ if PY2:
assert version_info[1] > 6, 'Python >= 2.7 required' assert version_info[1] > 6, 'Python >= 2.7 required'
from collections import Hashable, Iterator, Mapping, MutableMapping from collections import Hashable, Iterator, Mapping, MutableMapping
from re import compile from re import compile as compile_re
from sys import version_info
if PY2: if PY2:
iteritems = lambda x: x.iteritems() iteritems = lambda x: x.iteritems()
@ -890,7 +889,7 @@ class collapsingbidict(bidict):
_put = bidict.forceput _put = bidict.forceput
_LEGALNAMEPAT = '^[a-zA-Z][a-zA-Z0-9_]*$' _LEGALNAMEPAT = '^[a-zA-Z][a-zA-Z0-9_]*$'
_LEGALNAMERE = compile(_LEGALNAMEPAT) _LEGALNAMERE = compile_re(_LEGALNAMEPAT)
def _empty_namedbidict(mapname, fwdname, invname): def _empty_namedbidict(mapname, fwdname, invname):
''' '''