diff options
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/parameter.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ipalib/parameter.py b/ipalib/parameter.py index fca95b0e..76a9cd50 100644 --- a/ipalib/parameter.py +++ b/ipalib/parameter.py @@ -24,6 +24,7 @@ Parameter system for command plugins. from types import NoneType from plugable import ReadOnly, lock, check_name from constants import NULLS, TYPE_ERROR, CALLABLE_ERROR +from util import make_repr class DefaultFrom(ReadOnly): @@ -287,6 +288,16 @@ class Param(ReadOnly): # And we're done. lock(self) + def __repr__(self): + """ + Return an expresion that could construct this `Param` instance. + """ + return make_repr( + self.__class__.__name__, + self.param_spec, + **self.__kw + ) + def normalize(self, value): """ Normalize ``value`` using normalizer callback. |