MCPcopy Create free account
hub / github.com/rthalley/dnspython / match

Method match

dns/rrset.py:96–111  ·  view source on GitHub ↗

Does this rrset match the specified attributes? Behaves as :py:func:`full_match()` if the first argument is a ``dns.name.Name``, and as :py:func:`dns.rdataset.Rdataset.match()` otherwise. (This behavior fixes a design mistake where the signature of this meth

(self, *args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

94 return super().__eq__(other)
95
96 def match(self, *args: Any, **kwargs: Any) -> bool: # type: ignore[override]
97 """Does this rrset match the specified attributes?
98
99 Behaves as :py:func:`full_match()` if the first argument is a
100 ``dns.name.Name``, and as :py:func:`dns.rdataset.Rdataset.match()`
101 otherwise.
102
103 (This behavior fixes a design mistake where the signature of this
104 method became incompatible with that of its superclass. The fix
105 makes RRsets matchable as Rdatasets while preserving backwards
106 compatibility.)
107 """
108 if isinstance(args[0], dns.name.Name):
109 return self.full_match(*args, **kwargs) # type: ignore[arg-type]
110 else:
111 return super().match(*args, **kwargs) # type: ignore[arg-type]
112
113 def full_match(
114 self,

Callers 6

full_matchMethod · 0.45
_parse_modifyMethod · 0.45
inet_ntoaFunction · 0.45
inet_atonFunction · 0.45

Calls 1

full_matchMethod · 0.95