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 Mark.Shannon
Recipients Mark.Shannon, methane, serhiy.storchaka
Date 2020-03-30.15:39:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585582755.02.0.0261914803681.issue40116@roundup.psfhosted.org>
In-reply-to
Content
Just to clarify.

class AlwaysShared:

   opt = DEFAULT

   def __init__(self, attr, optional=None):
       self.attr = attr
       if optional:
           self.opt = optional

class SometimesShared:

   opt = DEFAULT

   def __init__(self, attr, optional=None):
       if optional:
           self.opt = optional
       self.attr = attr

The class AlwaysShared always has shared keys, whereas the class SometimesShared is not shared if `optional` is True for first instantiation, but False for a later instantiation.
History
Date User Action Args
2020-03-30 15:39:15Mark.Shannonsetrecipients: + Mark.Shannon, methane, serhiy.storchaka
2020-03-30 15:39:15Mark.Shannonsetmessageid: <1585582755.02.0.0261914803681.issue40116@roundup.psfhosted.org>
2020-03-30 15:39:15Mark.Shannonlinkissue40116 messages
2020-03-30 15:39:14Mark.Shannoncreate