def Deserializer(stream_or_string, **options):
 if isinstance(stream_or_string, basestring):
  stream = StringIO(stream_or_string)
 else:
  stream = stream_or_string
 for obj in PythonDeserializer(yaml.load(stream), **options):
  (yield obj)

def Deserializer ( stream_or_string , ** options ) : if isinstance ( stream_or_string , basestring ) : stream = StringIO ( stream_or_string ) else : stream = stream_or_string for obj in PythonDeserializer ( yaml . load ( stream ) , ** options ) : ( yield obj )
deserialize a stream or string of yaml data .