Message365325
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. |
|
Date |
User |
Action |
Args |
2020-03-30 15:39:15 | Mark.Shannon | set | recipients:
+ Mark.Shannon, methane, serhiy.storchaka |
2020-03-30 15:39:15 | Mark.Shannon | set | messageid: <1585582755.02.0.0261914803681.issue40116@roundup.psfhosted.org> |
2020-03-30 15:39:15 | Mark.Shannon | link | issue40116 messages |
2020-03-30 15:39:14 | Mark.Shannon | create | |
|