diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-13 19:50:49 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-13 19:50:49 (GMT) |
| commit | db9b65d9e5d9d39199714cfd15a26e46ab0eaae1 (patch) | |
| tree | c8b2b598895c948a49ece65b52936f477eea89fd /Lib/lib2to3/refactor.py | |
| parent | bd62f0a6e4705ff6ae627df6afe9d871778f80eb (diff) | |
| download | cpython-db9b65d9e5d9d39199714cfd15a26e46ab0eaae1.zip cpython-db9b65d9e5d9d39199714cfd15a26e46ab0eaae1.tar.gz cpython-db9b65d9e5d9d39199714cfd15a26e46ab0eaae1.tar.bz2 | |
Issue #22823: Use set literals in lib2to3.
Diffstat (limited to 'Lib/lib2to3/refactor.py')
| -rw-r--r-- | Lib/lib2to3/refactor.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py index 8100317..c24be14 100644 --- a/Lib/lib2to3/refactor.py +++ b/Lib/lib2to3/refactor.py @@ -57,7 +57,7 @@ def _get_head_types(pat): # Always return leafs if pat.type is None: raise _EveryNode - return set([pat.type]) + return {pat.type} if isinstance(pat, pytree.NegatedPattern): if pat.content: @@ -133,7 +133,7 @@ def _detect_future_features(source): def advance(): tok = next(gen) return tok[0], tok[1] - ignore = frozenset((token.NEWLINE, tokenize.NL, token.COMMENT)) + ignore = frozenset({token.NEWLINE, tokenize.NL, token.COMMENT}) features = set() try: while True: |
