property: add property.__str__
This commit is contained in:
parent
f7cb8f27c5
commit
f9fa27dacc
@ -294,8 +294,10 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name
|
||||
if self._default is not self._NO_DEFAULT \
|
||||
else ''
|
||||
return '<{} object at {:#x} name={!r}{}>'.format(
|
||||
self.__class__.__name__, id(self), self.__name__, default) \
|
||||
self.__class__.__name__, id(self), self.__name__, default)
|
||||
|
||||
def __str__(self):
|
||||
return self.__name__
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.__name__)
|
||||
|
Loading…
Reference in New Issue
Block a user