def all_properties(decl):
 for item in decl.seq:
  p = item.value
  if isinstance(p, Property):
   (yield p)

def all_properties ( decl ) : for item in decl . seq : p = item . value if isinstance ( p , Property ) : ( yield p )
this is needed because cssstyledeclaration .