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

Method _check_params

dns/exception.py:71–78  ·  view source on GitHub ↗

Old exceptions supported only args and not kwargs. For sanity we do not allow to mix old and new behavior.

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

69 super().__init__(self.msg)
70
71 def _check_params(self, *args, **kwargs):
72 """Old exceptions supported only args and not kwargs.
73
74 For sanity we do not allow to mix old and new behavior."""
75 if args or kwargs:
76 assert bool(args) != bool(
77 kwargs
78 ), "keyword arguments are mutually exclusive with positional args"
79
80 def _check_kwargs(self, **kwargs):
81 if kwargs:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected