CompoundMatch.destructure()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
"""Abstract base class for advanced match classes."""
2
3
4
class CompoundMatch:
5
    """Abstract base class for advanced match classes."""
6
7
    __slots__ = ()
8
9
    def destructure(self, value):
10
        """Given a value, return a sequence of values extracted from the match.
11
12
        Usually has special-case behavior when ``value is self``, possibly as
13
        part of a broader conditional that happens to be true in that specific
14
        case as well.
15
        """
16
        raise NotImplementedError
17