diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 21:39:17 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 21:39:17 -0400 |
| commit | df3f02025c00a7623c6771c454cb3dfb2c29caa5 (patch) | |
| tree | d1dfeecb7ee286d828394b2bbfb792f8f3039987 /passlib/utils | |
| parent | e9094d438c4ae95b3c5cda503d49e14619f5b885 (diff) | |
| download | passlib-df3f02025c00a7623c6771c454cb3dfb2c29caa5.tar.gz | |
python compat cleanup -- replace stray ".im_func" refs
Diffstat (limited to 'passlib/utils')
| -rw-r--r-- | passlib/utils/decor.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/passlib/utils/decor.py b/passlib/utils/decor.py index aa40925..e1fd601 100644 --- a/passlib/utils/decor.py +++ b/passlib/utils/decor.py @@ -31,15 +31,12 @@ class classproperty(object): """Function decorator which acts like a combination of classmethod+property (limited to read-only properties)""" def __init__(self, func): - self.im_func = func + # XXX: rename to .fget to match property? + self.__func__ = func def __get__(self, obj, cls): - return self.im_func(cls) + return self.__func__(cls) - @property - def __func__(self): - """py3 compatible alias""" - return self.im_func class hybrid_method(object): """ @@ -48,6 +45,7 @@ class hybrid_method(object): """ def __init__(self, func): + # XXX: rename to .fget to match property? self.func = func update_wrapper(self, func) |
