twisted.python.deprecate._mutuallyExclusiveArguments(argumentPairs) function documentationtwisted.python.deprecate
View Source
Decorator which causes its decoratee to raise a TypeError if two of the given arguments are passed at the same time.
| Parameters | argumentPairs | pairs of argument identifiers, each pair indicating an argument that may not be passed in conjunction with another. (type: sequence of 2-sequences of str) |
| Returns | A decorator, used like so:
@_mutuallyExclusiveArguments([["tweedledum", "tweedledee"]])
def function(tweedledum=1, tweedledee=2):
"Don't pass tweedledum and tweedledee at the same time."
(type: 1-argument callable taking a callable and returning a callable.) | |
| Function | wrapper | Undocumented |