mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
added removeIfEqual
This commit is contained in:
parent
b840ad0a05
commit
d2ef6068bc
@ -40,5 +40,11 @@ class BulletinBoard:
|
|||||||
if postName in self._dict:
|
if postName in self._dict:
|
||||||
del self._dict[postName]
|
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):
|
def __repr__(self):
|
||||||
return str(self._dict)
|
return str(self._dict)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user