This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients Michael Robellard, eric.smith
Date 2020-01-08.00:32:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578443559.72.0.588037784068.issue39247@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-01-08 00:32:39eric.smithsetrecipients: + eric.smith, Michael Robellard
2020-01-08 00:32:39eric.smithsetmessageid: <1578443559.72.0.588037784068.issue39247@roundup.psfhosted.org>
2020-01-08 00:32:39eric.smithlinkissue39247 messages
2020-01-08 00:32:39eric.smithcreate