Index: pyyaml/trunk/lib/yaml/constructor.py
===================================================================
--- pyyaml/trunk/lib/yaml/constructor.py	(revision 251)
+++ pyyaml/trunk/lib/yaml/constructor.py	(revision 258)
@@ -37,4 +37,11 @@
         if self.check_node():
             return self.construct_document(self.get_node())
+
+    def get_single_data(self):
+        # Ensure that the stream contains a single document and construct it.
+        node = self.get_single_node()
+        if node is not None:
+            return self.construct_document(node)
+        return None
 
     def construct_document(self, node):
