mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
Issue #22823: Use set literals instead of creating a set from a list
This commit is contained in:
parent
bf764a1912
commit
df1b699447
10 changed files with 19 additions and 20 deletions
|
@ -22,10 +22,10 @@ if _sre.CODESIZE == 2:
|
|||
else:
|
||||
MAXCODE = 0xFFFFFFFF
|
||||
|
||||
_LITERAL_CODES = set([LITERAL, NOT_LITERAL])
|
||||
_REPEATING_CODES = set([REPEAT, MIN_REPEAT, MAX_REPEAT])
|
||||
_SUCCESS_CODES = set([SUCCESS, FAILURE])
|
||||
_ASSERT_CODES = set([ASSERT, ASSERT_NOT])
|
||||
_LITERAL_CODES = {LITERAL, NOT_LITERAL}
|
||||
_REPEATING_CODES = {REPEAT, MIN_REPEAT, MAX_REPEAT}
|
||||
_SUCCESS_CODES = {SUCCESS, FAILURE}
|
||||
_ASSERT_CODES = {ASSERT, ASSERT_NOT}
|
||||
|
||||
def _compile(code, pattern, flags):
|
||||
# internal: compile a (sub)pattern
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue