Message359564
Your code basically becomes similar to this:
sentinel = object()
class FileObject:
_uploaded_by: str = None
uploaded_by = None
def __init__(self, uploaded_by=sentinel):
if uploaded_by is sentinel:
self.uploaded_by = FileObject.uploaded_by
else:
self.uploaded_by = uploaded_by
def save(self):
print(self.uploaded_by)
@property
def uploaded_by(self):
return self._uploaded_by
@uploaded_by.setter
def uploaded_by(self, uploaded_by):
print('Setter Called with Value ', uploaded_by)
self._uploaded_by = uploaded_by
Which has the same problem. I'll have to give it some thought. |
|
Date |
User |
Action |
Args |
2020-01-08 00:32:39 | eric.smith | set | recipients:
+ eric.smith, Michael Robellard |
2020-01-08 00:32:39 | eric.smith | set | messageid: <1578443559.72.0.588037784068.issue39247@roundup.psfhosted.org> |
2020-01-08 00:32:39 | eric.smith | link | issue39247 messages |
2020-01-08 00:32:39 | eric.smith | create | |
|