mirror of https://github.com/asciimoo/exrex.git
Compare commits
2 Commits
9a66706e75
...
239e4da37f
Author | SHA1 | Date |
---|---|---|
Adam Tauber | 239e4da37f | |
Michael Souza | 44712bfb13 |
6
exrex.py
6
exrex.py
|
@ -22,7 +22,11 @@ try:
|
||||||
from future_builtins import map, range
|
from future_builtins import map, range
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
from re import match, sre_parse, U
|
from re import match, U
|
||||||
|
try:
|
||||||
|
import re._parser as sre_parse
|
||||||
|
except ImportError: # Python < 3.11
|
||||||
|
from re import sre_parse
|
||||||
from itertools import tee
|
from itertools import tee
|
||||||
from random import choice, randint
|
from random import choice, randint
|
||||||
from types import GeneratorType
|
from types import GeneratorType
|
||||||
|
|
6
tests.py
6
tests.py
|
@ -20,8 +20,12 @@
|
||||||
|
|
||||||
from exrex import generate, count, getone, CATEGORIES, simplify
|
from exrex import generate, count, getone, CATEGORIES, simplify
|
||||||
import re
|
import re
|
||||||
import sre_parse
|
try:
|
||||||
|
import re._parser as sre_parse
|
||||||
|
except ImportError: # Python < 3.11
|
||||||
|
from re import sre_parse
|
||||||
from sys import exit, version_info
|
from sys import exit, version_info
|
||||||
|
|
||||||
IS_PY3 = version_info[0] == 3
|
IS_PY3 = version_info[0] == 3
|
||||||
|
|
||||||
RS = {
|
RS = {
|
||||||
|
|
Loading…
Reference in New Issue