mutate the membership set if it hasn't been loaded yet.
Signed-off-by: Evan Broder <broder@mit.edu>
Args:
elt: The element to add.
"""
Args:
elt: The element to add.
"""
- self._set.add(self._ent._pts.getEntry(elt))
+ if hasattr(self, '_set'):
+ self._set.add(self._ent._pts.getEntry(elt))
def _discard(self, elt):
"""Remove a PTEntry to this instance's internal representation.
def _discard(self, elt):
"""Remove a PTEntry to this instance's internal representation.
Args:
elt: The element to discard.
"""
Args:
elt: The element to discard.
"""
- self._set.discard(self._ent._pts.getEntry(elt))
+ if hasattr(self, '_set'):
+ self._set.discard(self._ent._pts.getEntry(elt))
def __len__(self):
"""Count the members/groups in this set.
def __len__(self):
"""Count the members/groups in this set.