def remove_property_value(prop, predicate):
 removed_vals = []
 removed_vals = filter(predicate, prop.propertyValue)
 if (len(removed_vals) == len(prop.propertyValue)):
  prop.parent.removeProperty(prop.name)
 else:
  x = prop.propertyValue.cssText
  for v in removed_vals:
   x = x.replace(v.cssText, u'').strip()
  prop.propertyValue.cssText = x
 return bool(removed_vals)

def remove_property_value ( prop , predicate ) : removed_vals = [ ] removed_vals = filter ( predicate , prop . propertyValue ) if ( len ( removed_vals ) == len ( prop . propertyValue ) ) : prop . parent . removeProperty ( prop . name ) else : x = prop . propertyValue . cssText for v in removed_vals : x = x . replace ( v . cssText , u'' ) . strip ( ) prop . propertyValue . cssText = x return bool ( removed_vals )
remove the values that match the predicate from this property .