summaryrefslogtreecommitdiff
path: root/Cython/Compiler/MatchCaseNodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Compiler/MatchCaseNodes.py')
-rw-r--r--Cython/Compiler/MatchCaseNodes.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Cython/Compiler/MatchCaseNodes.py b/Cython/Compiler/MatchCaseNodes.py
index 579cf7d94..b4d39e318 100644
--- a/Cython/Compiler/MatchCaseNodes.py
+++ b/Cython/Compiler/MatchCaseNodes.py
@@ -1,7 +1,6 @@
# Nodes for structural pattern matching.
#
-# In a separate file because they're unlikely to be useful
-# for much else
+# In a separate file because they're unlikely to be useful for much else.
from .Nodes import Node, StatNode
from .Errors import error
@@ -69,7 +68,7 @@ class PatternNode(Node):
def __init__(self, pos, **kwds):
super(PatternNode, self).__init__(pos, **kwds)
- if not hasattr(self, "as_targets"):
+ if "as_targets" not in kwds:
self.as_targets = []
def is_irrefutable(self):