mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
22: Named.name property now calls _get_name() at first evaluation to make changing the behaviour in subclasses easier
This commit is contained in:
parent
97a3520d37
commit
f3faaf2d29
@ -129,8 +129,15 @@ class NameSpace(object):
|
|||||||
|
|
||||||
|
|
||||||
class Named(object):
|
class Named(object):
|
||||||
def __get_name(self):
|
__name = None
|
||||||
|
|
||||||
|
def _get_name(self):
|
||||||
return self.__class__.__name__
|
return self.__class__.__name__
|
||||||
|
|
||||||
|
def __get_name(self):
|
||||||
|
if self.__name is None:
|
||||||
|
self.__name = self._get_name()
|
||||||
|
return self.__name
|
||||||
name = property(__get_name)
|
name = property(__get_name)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user