File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 22Utilities for typed interfaces.
33"""
44from inspect import Parameter
5- from itertools import dropwhile , starmap , takewhile , zip_longest
6- from operator import contains
5+ from itertools import starmap , takewhile , zip_longest
76
87from .functional import complement , dzip , valfilter
98
@@ -12,12 +11,19 @@ def compatible(impl_sig, iface_sig):
1211 """
1312 Check whether ``impl_sig`` is compatible with ``iface_sig``.
1413
14+ Parameters
15+ ----------
16+ impl_sig : inspect.Signature
17+ The signature of the implementation function.
18+ iface_sig : inspect.Signature
19+ The signature of the interface function.
20+
1521 In general, an implementation is compatible with an interface if any valid
1622 way of passing parameters to the interface method is also valid for the
1723 implementation.
1824
19- The following differences are allowed between an implementation and its
20- interface:
25+ Consequently, the following differences are allowed between the signature
26+ of an implementation methodand the signature of its interface definition :
2127
2228 1. An implementation may add new arguments to an interface iff:
2329 a. All new arguments have default values.
You can’t perform that action at this time.
0 commit comments