mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
added removeIfEqual
This commit is contained in:
parent
b840ad0a05
commit
d2ef6068bc
@ -40,5 +40,11 @@ class BulletinBoard:
|
||||
if postName in self._dict:
|
||||
del self._dict[postName]
|
||||
|
||||
def removeIfEqual(self, postName, value):
|
||||
# only remove the post if its value is a particular value
|
||||
if self.has(postName):
|
||||
if self.get(postName) == value:
|
||||
self.remove(postName)
|
||||
|
||||
def __repr__(self):
|
||||
return str(self._dict)
|
||||
|
Loading…
x
Reference in New Issue
Block a user